X++ code to Merge & Update Sales Order & Sales Line Financial Dimension.
X++ code to update Sales Order & Sales Line Financial Dimension.
static void RB_SLineFinDimensionUpdate(Args _args)
{
SalesTable salesTable,salesTableUpd;
SalesLine salesLine,salesLineUpd;
CustAccount custAccount;
DimensionDefault defaultDimension,itemDefaultDimension,custDefaultDimension;
salesTable = SalesTable::find('10000');
salesLine = salesLine::find(salesTable.SalesId,1,true);
if (salesLine)
{
itemDefaultDimension = InventTable::find(salesLine.ItemId).DefaultDimension;
custDefaultDimension = CustTable::find(salesTable.CustAccount).DefaultDimension;
defaultDimension = DimensionDefaultingService::serviceMergeDefaultDimensions(custDefaultDimension,itemDefaultDimension);
update_recordSet salesTableUpd
setting defaultDimension = custDefaultDimension
where salesTableUpd.salesId == salesTable.SalesId;
update_recordSet salesLineUpd
setting defaultDimension = defaultDimension
where salesLineUpd.RecId == salesLine.RecId;
}
}
Subscribe to:
Post Comments (Atom)
D365 F&O Release Pipeline Step by Step Configuration Without ISV's
Step-by-Step Guide: Creating D365FO Build and Deploy Pipelines Azure DevOps Build Pipeline I will walk through the standard procedures...
-
X++ code to read the Excel file static void RB_ReadExcel(Args _args) { SysExcelApplication application; SysExcelWorkbooks w...
-
//Create a new job and paste the code static void RB_ReadTextFile(Args _args) { Filename ...
-
// If the file path comes from the dialog , it automatically works ,else you need to Specify '\\' --------------------------------...
No comments:
Post a Comment