Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 37117

Forum Post: I am trying to populate a UDF with the Gross Margin by line.

$
0
0
I have created a script, and it does not seem to work. Do I put it under column validation, or some other mode. Here is the script. Retval=0 rExtcost rExtamount=0 rQtyship=0 rUnitcost=0 rLineGM=0 Set oLines = oBusObj.AsObject(oBusObj.Lines) oLines.MoveFirst do until oLines.EOF retVal=oLines.GetValue("ExtensionAmt", rExtamount) retVal=oLines.GetValue("QuantityShipped", rQtyship) retVal=oLines.GetValue("UnitCost", rUnitcost) rExtcost= rqtyship * rUnitcost rLineGM= ((rExtamount - rExtcost)/rExtamount)*100 retVal = oBusObj.SetValue("UDF_LINE_GM", rLineGM) retVal=oLines.MoveNext() loop

Viewing all articles
Browse latest Browse all 37117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>