Get Customer GSTIN from Sales order in ax 2012

Description: Here I have get Customer GSTIN number from Sales order number. It’s simple to get from table but we need to fire query for that instead of Sql query we can use table method to get GSTIN number for Customer or Customer.

Use below code to get Customer GSTIN number from Sales order number.

info(strFmt("%1",TaxRegistrationNumbers_IN::find(TaxInformation_IN::findDefaultbyLocation(DirPartyTable::findRec(CustTable::find(SalesTable::find("SalesOrderId").CustAccount).Party).PrimaryAddressLocation).GSTIN).RegistrationNumber));

Related Posts

Previous
Next Post »

Thanks for comments.....