how to get original record of a table in Dynamics D365 ,ax 2012
Hi all,
So in order to get the original record while updating any record in a table you will need the original/previously unchanged record to compare in some scenarios.
In that case you can use the below code as shown.
public void update()
{
InventTable this_Orig = this.orig();
ttsbegin;
super();
if (this_Orig.SalesModel != this.SalesModel ||
this_Orig.SalesPriceModelBasic != this.SalesPriceModelBasic ||
this_Orig.SalesContributionRatio != this.SalesContributionRatio ||
this_Orig.SalesPercentMarkup != this.SalesPercentMarkup)
{
InventTable::updateAutoSalesPrice(this.ItemId);
}
ttscommit;
}
thanks,
Vikas Mehta.
No comments:
Post a Comment