As per client requirement, in sales order there should be one field name area and this field should be calculated with amount…means 'Amount=quantityratearea. Done customization in Sales line function name-updateamounts,but its not working. Pls suggest ?
Where on SO “rate” and “area” fields are? Line or Header?
In sales Line–area is new field and — areaquantityunit price=amount. anyone can suggest ?
in OnValidate event of Area you can add:
Amount := Quantity * “Unit Price” * Area;
You can also paste that code in that event of Unit Price and Quantity so if user changes them afterward, still Amount gets updated!
Can we change Sales order base functionality of navision- in navision base ‘line amount Excl Vat’ is calculated with quantity and unit price but my scenario is i have created new field let Area and this new field should be multiply in "Line Amount Excl Vat’ means "Line Amount Excl Vat’:= quatity * “Unit Price”*Area. after that tax should be calculated on this scenario.
I have done customize in Sales line table function name =updateAmounts but its not working. My question is can we change base functionality of Sales line’s calculation of Line Amount. If yes where i have to changes…
Yes, Kundan, it is possible to modify the base functionality to accomplish your requirements and, from what you’ve already said, the UpdateAmounts function is probably the best place to put your changes. You’ve mentioned that you’ve tried making some changes in that function but you’re not getting the results you’re looking for?
Trying to debug someone else’s code in this forum can be tricky, especially when you’re working with complex code. You’re probably better served if I suggest that you try running the NAV debugger on your code first, to see whether you can track down the cause of the problems. Using the debugger is a process that depends on the version of NAV you’re using - the 2013 debugger is different from the 2009 debugger, which is quite a bit different from the previous versions. You may need to do some research to get that rolling too, but I think you’ll be time and energy ahead over trying to post all of your code here for debugging.