Sage 100

 View Only
  • 1.  I'm taking a stab at what I feel is a simple scrip

    Posted 10-24-2012 15:32
    I'm taking a stab at what I feel is a simple script to calculate the Extension amount on an SO line. Here is my script, which is not working: numPrice = 0 numQTY = 0 retVal = oBusObj.GetValue(""UDF_SO_LINE_SPECIAL_PRICE"", numPrice) retVal = oBusObj.GetValue(""UDF_SO_LINE_TESTQTY"", numQTY) retVal = oBusObj.SetValue(""ExtensionAmt"", numPrice * numQTY) My UD Script is on the SO Sales Order Detail table and the Event is Column - Post Validate. I have the External Access checkbox on in Company Maintenance. Can anyone tell me what it is I have wrong?


  • 2.  RE: I'm taking a stab at what I feel is a simple scrip

    Posted 10-24-2012 15:48
    Column - Post Validate on which Field? Probably should have on both UDFs above. If either one changes, the extension amount is recalculated.


  • 3.  RE: I'm taking a stab at what I feel is a simple scrip

    Posted 10-24-2012 15:54
    Post validate on the Extension field - see attachment.


  • 4.  RE: I'm taking a stab at what I feel is a simple scrip

    Posted 10-24-2012 15:55
      |   view attached
    Attachment here


  • 5.  RE: I'm taking a stab at what I feel is a simple scrip

    Posted 10-25-2012 07:31
    I think you are firing the script from the wrong fields. Don't you want the script to run on the post-val of UDF_Special_Price and/or UDF_TESTQTY?


  • 6.  RE: I'm taking a stab at what I feel is a simple scrip

    Posted 10-26-2012 09:25
    I think you may also need your script on the CPV event of the quantity and price field if you need to override either of their changes.