Get Vendor's and Customer's GST number in AX 2012 R3 or D365fo X++

 

Static getVendorGST(AccountNum _accountNum)
{
   VendTable           vendTable;
   DirPartyTable       dirPartyTable;
   LogisticsLocation   logisticsLocation;
   TaxInformation_IN   taxInformation_IN;

   select vendTable where vendTable.AccountNum == _accountNum
      join dirPartyTable
          where dirPartyTable.RecId == vendTable.Party
      join logisticsLocation
          where logisticsLocation.RecId == dirPartyTable.PrimaryAddressLocation;

   taxInformation_IN = TaxInformation_IN::findDefaultbyLocation(logisticsLocation.RecId);

   return TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber;
}

Table Browser in Dynamics 365FO

Copy D365FO Table Browser URL /?cmp=usmf&mi=SysTableBrowser&tablename= URL :  https://usnconeboxax1aos.cloud.onebox.dynamics.com...