Script does not trigger in Pre-Write event

SOLVED

Hi Forum,

I have a script that populates a UDF in sales order lines from 2 UDFs in the lines after the lines are entered...

if I trigger the event as Pre-Write it doesn't do anything.. but the same script I can trigger in a field as column post-validate event and works fine...

Any ideas as to why it doesn't trigger when we click the Accept button?

Regards,

Manuel Roman

Parents
  • 0

    The pre-write and post-write events will only fire if the record has been modified. Simply loading a sales order and then clicking Accept will not trigger the events.

    If you are positive you are making changes to the record and it still does not appear to be firing, then check what other scripts you have assigned to the same event and syntax check them all. If the priority is the same, they all get placed in the same VBS Sub and will error out silently if even one of them has a syntax error. 

    It also doesn't hurt to open the Trace Window so you can see what the script engine is reporting. Every time an event is triggered, it should write to the trace window.

  • 0 in reply to David Speck

    Hi David,

    Thanks for the response...

    If it is a new Sales Order it should trigger the event correct?...

    I have a few scripts but this is the only one for the Pre-Write event.

    So if the Sales Order exists the event won't be triggered unless there is a change... that sounds ok.

    I will open the Trace Windows just to see what is doing.

    Thank you very much.

Reply
  • 0 in reply to David Speck

    Hi David,

    Thanks for the response...

    If it is a new Sales Order it should trigger the event correct?...

    I have a few scripts but this is the only one for the Pre-Write event.

    So if the Sales Order exists the event won't be triggered unless there is a change... that sounds ok.

    I will open the Trace Windows just to see what is doing.

    Thank you very much.

Children