Is the Inventory Detail subrecord of a Work Order ...
# suitescript
c
Is the Inventory Detail subrecord of a Work Order Completion scriptable? I can get a handle to the Inventory Detail that but when trying to select a new line for inventoryassignment, it says that the current record does not support selecting a new line. Maybe there's a better way?
b
should be possible unless you are trying to do this in client script
c
You have to do it in a client script because you can't save the work order completion without setting inventory detail first or native netsuite throws an error
I'm trying to autogenerate the serial/lotnumber on the inventory detail which is usually not an issue but for some reason this record does not want to play nicely
b
Which records have you gotten the inventory details to work in client script?
Supported Deployments for Subrecord Scripting notes the limitations you should have
👍 1
c
no i mean typically you can set the inventory detail no problem. Wasn't specifically referring to a client script
Yeah I figured that was the case. I guess its not possible then because you have to fill out inventory detail to save unless there's a pref somewhere im not aware of.
b
depending on how invested in this you are, you can consider a hybrid javascript/suitescript approach where you put your logic in a client script deployed to the inventory detail record and rely on javascript to automatically click buttons
c
I think I may just do a middle man suitelet for them where you enter the quantity and then it'll transform the work order -> work order completion and I can see if i can set the inventory detail server-side.
👍 1
g
Hey @creece, I had the same issue a couple months ago and I also did a suitelet to create the record with the inventory detail filled. In my case it was to create the Item Receipt from the PO with the inventory detail automatically filled. That inventory detail subrecord is not editable in a client script, unfortunately.
👍 1
c
Yep, thats what I wound up doing was a middle man suitelet and it works fine.
👍 1