What This Article Is About
This article describes how to do a calculation on the mobile app using Anveo Script. Example: Calculate total amount of order based on sales lines.
- Add a new field Anveo Total Amount in Sales Header table.
- Add this field to your Synchronization package mark this field with Do not send
updates to NAV.
- Create a new Action Code that is responsible for your calculation and for opening the Anveo Page.
Example Code: Coming from Sales Order List, srcRec is also Sales Header.
local SalesHeader = Record('Sales Header');
--[[ Put your calculation here...]]
PAGE_OPEN('SALESORDER', SalesHeader, SalesHeader);
- Add your new field to your Sales Header Anveo Page.
Please note: It is not allowed to do precalulations in OnAfterGetRecord or OnOpen Trigger of the Anveo Page to manipulate the current record.
These triggers can only be used to do PAGE('SFA',...) commands.