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.

Reply
  • 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.

Children