web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to get Customer,Vendor VAT Registration Number by code in Axapta

SANTOSH KUMAR SINGH Profile Picture SANTOSH KUMAR SINGH 1,224

To get Customer,Vendor VAT Registration Number by code in Axapta in 2012 version you can try below code in data method on table label then you can use the method in string control on form .

This code will work perfectly .

 display name Get_TaxRegistration()  
{
TransDate _transDate = systemDateGet();
DirPartyLocation dirPartyLocation;
TaxRegistration taxRegistration;
TaxRegistrationTypeApplicabilityRule taxRegistrationTypeApplicabilityRule;
if (_transDate)
{
dirPartyLocation = DirPartyLocation::findByPartyLocation(
this.Party,
this.invoiceAddress().Location);
if (dirPartyLocation)
{
select firstonly validTimeState(_transDate) taxRegistration
where taxRegistration.DirPartyLocation == dirPartyLocation.RecId
join RecId from taxRegistrationTypeApplicabilityRule
order by taxRegistrationTypeApplicabilityRule.IsPrimaryAddressRestricted desc
where taxRegistration.TaxRegistrationTypeApplicabilityRule == taxRegistrationTypeApplicabilityRule.RecId;
}
}
return taxRegistration.RegistrationNumber;
}


This was originally posted here.

Comments

*This post is locked for comments