Hello there,
I've got the following code below to add a hold onto a sales order.
ttsBegin;
MCRHoldCodeTrans holdCodeTrans;
holdCodeTrans.InventRefId = _salesId;
holdCodeTrans.MCRHoldCode = 'Pricing';
holdCodeTrans.insert();
ttsCommit;
I've added this code to an extension class in WhsWarehouseRelease. Something must be off as I'm not seeing the hold applied. What I've tried is running the code in a Runnable class and it appears to work there. I may be missing something?
Thank you!