- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Receipt of Goods Total after Script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-21-2011 10:40 AM
I am not showing the Unit Cost field, but created a Unit Cost UDF field for Entry which would be the full amount and I will calculate the unit cost from that amount. That works well and during entry all is fine, but if I make a change to the UDF Unit Cost, the Extension is calculated correct, but on the bottom of the screen the Total is not updated. If I go to the totals tab and back to the Lines tab, then the screen Total displays correctly or if I go back and re-enter the quantity field the total is correct.
I.
This is my script which is done Column Post Validate on my UDF Unit Cost field
TmpDisc=0
TmpCost=0
TmpAmt=0
TmpQty=0
retVal=oHeaderObj.GetValue("UDF_DISCPCT",TmpDisc)
retVal=oBusObj.GetValue("UDF_NEWCOST",TmpCost)
retVal=oBusObj.GetValue("UDF_DISCAMT",TmpAmt)
retVal=oBusObj.GetValue("QuantityOrdered",TmpQty)
retVal=oBusObj.SetValue("UnitCost",(TmpCost-(TmpCost*TmpDisc)))
retVal=oBusObj.SetValue("UDF_DISCAMT",(TmpCost*TmpDisc))
Thank you in advance.
Solved! Go to Solution.
Re: Receipt of Goods Total after Script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-21-2011 11:48 AM
I'm not sure if there is a good solution to this or not. I'm also struggling with the same thing. The problem is we are totally on the business object side with scripting.
In MAS when the UI Unit Cost field is changed, a UI event fires that makes a call to change the value in the business object, then it runs code to update the total field which exists in the UI. The total field doesn't even exist in the business object as it is just a calculated field.
I'll let you know if I figure anything out.
Re: Receipt of Goods Total after Script
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-21-2011 12:37 PM
If you do not mind using a different UDF field for the total, then it appears what Dawn describes in the below post will work.


