The invoice record has a client script function on...
# suitescript
c
The invoice record has a client script function on Page Init. Logging confirms that this function runs in the UI. An SS1 scheduled script calls nlapiTransformRecord to create an invoice. When this happens, the function mentioned above doesn't run. Please can someone suggest why? Would it be because the call to nlapiTransformRecord does not specify dynamic mode? (I can't change the script because it's locked as part of a bundle, I'm just trying to understand the behaviour.)
n
You are transforming the record which happens server side. Unless you are loading the record via the UI the client script has no affect.
c
Would using dynamic mode cause client scripts to run?
n
No, client scripts only run in the browser.
c
Ok, thank you very much
n
I think, to clarify, the point is your scheduled script is a server side script so client has no bearing on the process. I don't want that to sound like I was implying transform record was the issue though arguably even if you tried to transform a record in client script the same would apply, you're not opening the record directly in the browser. 😉
c
Thanks, that's what I understood