Can I automate sales tax calculation in GP using Dexterity?
Overview
Some of our clients wish to customize their GP environment to force tax to calculate automatically in GP with no user interaction. This is possible through a cross dictionary call.
Environment
Dynamics GP
Resolution
Calling Avalara script from 3rd party dictionary
- Below is the list of parameter used in AVACalculateSalesTaxForSalesDocWithinPostingBatch script and this script is used in SOP Tax update utility to recalculate tax for the documents.
- If user want to call this script from 3rd party dictionary they can use “call with name” function of dexterity and pass required parameters to the same (Please note call with name requires Avalara product id to use this function and that is 4776)
AVACalculateSalesTaxForSalesDocWithinPostingBatch
|
|
- Example for how to use call with name is as below (this is just an example with dummy script)
The first script is within your own dictionary. This allows a foreign dictionary to call your script and retrieve information.
in string IN_Item_Number;
out string OUT_Color;
out long OUT_Size;
out boolean OUT_Not_Found;
'Item Number' of table GPS_Item_Info = IN_Item_Number;
get table GPS_Item_Info;
if err()=OKAY then
OUT_Color = 'Color' of table GPS_Item_Info;
OUT_Size = 'Size' of table GPS_Item_Info;
OUT_Not_Found = false;
else
OUT_Not_Found = true;
end if;
Here is a script that calls this first script. This code is used within the foreign dictionary.
local boolean l_Not_Found;
call with name "api_Retrieve_Item_Info" in dictionary DICTID_INTEGRATING,
'Item Number', '(L) Color', '(L) Size', l_Not_Found;