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
NElliott
07/14/2020, 11:50 AM
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
cja
07/14/2020, 11:51 AM
Would using dynamic mode cause client scripts to run?
n
NElliott
07/14/2020, 11:52 AM
No, client scripts only run in the browser.
c
cja
07/14/2020, 11:52 AM
Ok, thank you very much
n
NElliott
07/14/2020, 11:54 AM
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. 😉