does anyone know under what circumstances `runtime...
# suitescript
d
does anyone know under what circumstances
runtime.executionContext
is CLIENT? I am creating a record in a clientScript type, and thereby another UserEvent script on that recordType is triggering, but the executionContext on that script is saying USEREVENT; I would not expect this to be the case since it is being initiated by a client action?
n
think it's USER_INTERFACE your IDE should be able to tell you 😉 go to help and search "runtime.ContextType"
probably need:
Copy code
runtime.executionContext !== runtime.ContextType.USER_INTERFACE
to exclude actions
d
I am saying when logging runtime.executionContext on the UserEvent script later being triggered, it is logging unexpectedly as literally 'USEREVENT'
n
No idea then since a UE cannot trigger another UE so, yeah, mystery.
d
I mean lets say script 1 is a UserEvent which theoretically called script 2 which is a Suitelet, I would expect
runtime.executionContext
to be 'USEREVENT' when logging from the "point of view" of the Suitelet
regardless, for my initial use-case I am still very puzzled why it would not trigger as being 'CLIENT' from standpoint of second UserEvent being triggered