Skip to main content
Avalara Help Center

Can I automate sales tax calculation in GP using Dexterity?


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.


Dynamics GP


Calling Avalara script from 3rd party dictionary

  1. 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.
  2. 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)




  • in string IN_SOPNumber; (SOP Number)
  • in integer IN_SOPType; (SOP Type)
  • in date IN_SOPDocumentDate; (Document Date)
  • out currency OUT_TotalSalesTaxForDocument; (Total Tax calculated from AVALARA)
  • out boolean OUT_ResultFlag; (Result code from AVALARA service if there is any error of Success for tax call)
  • out string OUT_CalculationStatus; (Status for Tax calculation)
  • out string OUT_StatusCode;
  • out string  (Status for Tax calculation)
  • OUT_ErrorCode; (Error Code from AVALARA service in case of error)
  • out string OUT_ErrorString; (Error message from AVALARA service in case of error)
  • out string OUT_DocID; (Not used)


  1. 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;


       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;







  • Was this article helpful?