Does anyone know if you can invoke the create work...
# suitescript
t
Does anyone know if you can invoke the create work order process linked on a sales order line, via script? You can check the create work order box on the line only when the order is created. Once created, it has the hyperlink.
b
pay attention to the url of the link
the query parameters are default values that you can use with record.create
🙌 1
t
Thanks! I'll give that a shot
m
It is easier to configure the item to generate the WO automatically
t
But that would generate a work order everytime, right? I only want to generate a wo if there isn't already inventory available to fulfill it.
m
But, you can stop the WO creation
t
You mean like a before submit on the work order record that checks inventory prior to making it?
That gave me an idea to just add a before submit on sales order to check if the line will be backordered (quantityavailable-quantity) < 0. If < 0, he check the createwo box.