Hi
I wrote a simple script to trigger a message on the Sales Order Details Line when the Unit Cost is greater than the Unit Price but for some reasons, the message is not popping up. I set the event trigger to Post Column on QtyOrdered but when I enter the QtyOrdered on the line item, nothing pops up.
Any help? Here's my script.
if oSession.CompanyCode = "TTT" then
Cost = 0
Price = 0
retVAL =oBusObj.GetValue("UnitCost",Cost)
retVAL =oBusObj.GetValue("UnitPrice",Price)
if Cost > Price then
retVal = oScript.SetError("WARNING: CANNOT USE THIS ITEM! The Item Cost is less than the Item Unit Price.")
end if
end if