Hi everyone! I have a UE script on the Aftersubmit...
# suitescript
m
Hi everyone! I have a UE script on the Aftersubmit event that updates adds an assembly item to a sales order and changes its status to pending fulfillment. If I run this through the UI, a work order is automatically created after the assembly item is added but if it goes through the script, the work order is not created. I am using js 1.0 is there a way to force to trigger this NS automatic work order creation event, after calling submitRecord?
c
m
that is set to yes by the scritp
so yes it is set but the wo is not being triggered
b
literally the string
"yes"
or
"T"
m
T
b
what does the code look like
m
I dont have it here but the question was to understand if these sort of automatic processes like createing a work order can be affected if the process is called through a script or through the UI
and if there was an extra parameter that should be passed to the submitRecord that might do any difference
c
Well you have a UE w/ an afterSubmit doing a submitRecord which im guessing you're expecting to do something but a UE can't call another UE. You probably want to move the logic to beforeSubmit and try again.
m
ok
so i will have to create the WO from within the UE
right?
c
Without seeing code, I'd move the item addition to a beforeSubmit, check the "createwo" box and let NetSuite do it natively.
m
you are right
thanks