Hi,
Can anyone organised my below x++ code, I am new to x++ & would like to get TRN in SalesInvoiceDP as i can achieve it using below but would like to optimize it.
select * from custable
where custable.AccountNum==salesTable.InvoiceAccount;
select *From dirpartytable
where dirpartytable.RecId==custable.Party;
select *From dirpartylocation
where dirpartylocation.Party==dirpartytable.RecId && dirpartylocation.IsPrimary==1;
select RegistrationNumber from taxregistration
where taxregistration.DirPartyLocation == dirPartyLocation.RecId && taxregistration.ValidTo>=today();
Thanks in advance.
Regards
Mahmood
*This post is locked for comments