What's your best solution and best practice on retriggering some UE scripts of Sales Order, through UE Script? (e.g. Creation of Item Fulfillment should re-trigger UE of SO). Currently doing it via https.post to a Suitelet that would do record.load and save on passed SO internal ID parameter. Thank you!
b
battk
12/01/2023, 2:03 AM
ideally you do something better for performance, like using N/task to make a scheduled script (or more uncommonly a map/reduce) handle the sales order stuff
battk
12/01/2023, 2:06 AM
still bad for performance, but more sane is rewriting the sales order logic to use a shared module so that both scripts can run the logic without needing to trigger the other
💯 1
s
sholomon12
12/01/2023, 2:07 AM
Yeah I was thinking of that one, but the goal was to reflect the changes as soon as it can. Records on our end are fast moving, meaning would N/task overload the available deployment?
Yeah I 100% agree with the performance, that's the thing I'm quite worried about. Torn now between rewriting those functionalities and sacrificing performance
b
battk
12/01/2023, 2:07 AM
finally, if you dont care about performance , then you can use https.requestRestlet to show that you care about security, a public facing suitelet fails more security concerns
👀 1
s
sholomon12
12/01/2023, 2:08 AM
Thank you! I'll take a look. Have to review the N/task option as well and see how it performs to fast moving records.
b
battk
12/01/2023, 2:09 AM
either way, you are going to be paying the cost of saving the sales order again, its just that N/task defers that to a later time
battk
12/01/2023, 2:09 AM
and as a side effect, also triggers user event scripts