Discussions
Scripting assembly builds to only withdraw inventory when approved
I'm trying to write a script that will prevent finished goods from being withdrawn from inventory if the assembly build is awaiting approval. This is the first script I've ever done and first time ever using Javascript so I apologize if what I have so far makes no sense (and if I sound dumb). The script checks if the record is an assembly build that is being created or edited then creates a temporary field, "quantity pending". When saved, if approval status is "awaiting approval", the script assigns the value of quantity pending to the value in Quantity to Build,