Scripting

  • 1.  Script runs on MAS90, but not on MAS200. Is there

    Posted 07-22-2013 10:57
    Script runs on MAS90, but not on MAS200. Is there a trick? I wrote a simple script (the only kind I know how to write) that calculates the SO Line item GM% based on the item std cost. this is based on an SO Det UDF pulling in the item std cost, then the script based on that and the unit price. It works just hunky dory on MAS90, but doesn't do diddly squat in MAS200 (technical terms). Any ideas? - Script is below 'Calculate GM% based on unit price and std cost 'UDF_STD_COST 'LastAllocatedUnitCost 'UnitPrice 'UDF_GM nUDF_STD_COST = 0 nUnitPrice = 0 nUDF_GM = 0 retVal = oBusObj.GetValue (""UDF_STD_COST"",nUDF_STD_COST) retVal = oBusObj.GetValue (""UnitPrice"",nUnitPrice) if nUnitPrice = 0 then retVal = oBusObj.SetValue (""UDF_GM"",0) end if if nUnitPrice <> 0 then retVal = oBusObj.SetValue(""UDF_GM"",((nUnitPrice - nUDF_STD_COST)/nUnitPrice)*100 ) end if


  • 2.  RE: Script runs on MAS90, but not on MAS200. Is there

    Posted 07-22-2013 12:10
    Yeah, the trick is to turn on ""Allow External Access"" in Company Maintenance on the customer's MAS 200.... Is that a Darwin award I see?