How to update funding Source for Project Contract in Ax 2012
If you want to update funding Source for Project Contract in Ax 2012 by code then you can get idea from below code. These all standard table.
ProjFundingSource projFundingSource;
ProjInvoiceTable projInvoiceTable;
LogisticsLocation logisticsLocation,logisticsLocationNew;
;
ttsBegin;
while select projInvoiceTable order by ProjInvoiceProjId desc
{
if(projInvoiceTable.ProjInvoiceProjId != "ProjID")
{
if(projInvoiceTable.fundingSourceName() != "")
{
while select forUpdate projFundingSource where projFundingSource.ContractId == projInvoiceTable.ProjInvoiceProjId
{
projFundingSource.FundingSourceId = projInvoiceTable.fundingSourceName();
projFundingSource.InvoiceLocation = 0;
projFundingSource.update();
}
}
}
else
break;
}
ttsCommit;
Comments
Post a Comment