Wednesday, October 22, 2025

Get salestax amount of each individual purchline

 Scenario:- In this post we see how we can get salestax amount of a purchline from purchase order

code:-

PurchTable purchTable =PurchTable::find('00000400');
PurchTotals purchTotals = PurchTotals::newPurchTable(purchTable);
purchTotals.calc();
TmpTaxWorkTrans tmpTaxWorkTrans;
tmpTaxWorkTrans.setTmpData(purchTotals.tax().tmpTaxWorkTrans());

real salestax;

while select * from tmpTaxWorkTrans
     where tmpTaxWorkTrans.SourceRecId == Pass Purchlinerecid
{
     // Process the tax information for the specific line
     salestax+=tmpTaxWorkTrans.TaxAmount;
}

info(strfmt("SalesTaxamount:-%1",salestax));

Debug In D365fo with Tier 2 environment database

 Today in this blog we will see how to debug in d365fo with Tier2 env's(uat,gc,preprod) Step 1:-  Request JIT access  If you have LCS ac...