salesLine = source; salesCurrency = salesLine.CurrencyCode; moduleCategory = HeadingLine::Line; itemCode = TableGroupAll::Table; while select markupAutoLine index hint TableIdx where markupAutoLine.TableTableId == markupAutoTable.TableId && markupAutoLine.TableRecId == markupAutoTable.RecId && markupAutoLine.CurrencyCode == salesCurrency { markupTrans.clear(); markupTrans.initFromMarkupTable(markupAutoLine.markupTable()); markupTrans.initFromMarkupAutoLine(markupAutoLine); switch (source.TableId) { case tableNum(SalesTable) : markupTrans.initFromSalesTable(source); break; case tableNum(SalesLine) : markupTrans.initFromSalesLine(source); if (salesLine.ReturnDispositionCodeId) { markupTrans.IsAutoCharge = true; } break; } // Preserve original set up currency if (markupTrans.markupTable().CustType != MarkupType::CustVend && markupTrans.markupTable().VendType != MarkupType::CustVend) { markupTrans.CurrencyCode = markupAutoLine.MarkupCurrencyCode; } markupTrans.TransTableId = source.TableId; markupTrans.TransRecId = source.RecId; markupTrans.LineNum = MarkupTrans::lastLineNum(source.TableId, source.RecId) + 1; if (languageId) markupTrans.Txt = LanguageTxt::languageId(tableNum(MarkupAutoTable), markupAutoLine.RecId, languageId); if (! markupTrans.Txt) markupTrans.Txt = MarkupTable::find(markupAutoLine.ModuleType, markupAutoLine.MarkupCode).Txt; markupTrans.insert(); }
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Sunday, April 11, 2021
Create charges on sales order line in AX
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment