public Query getQueryOrderHoldRules() { Query query; QueryBuildDataSource qbdsMCRHoldCodeTable; query = new Query(); qbdsMCRHoldCodeTable = query.addDataSource(tableNum(MCRHoldCodeTable)); switch (documentStatus) { case CredManDocumentStatusCheck::Confirmation: qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZConfirmation)).value(SysQuery::value(NoYes::Yes)); break; case CredManDocumentStatusCheck::PickingList: qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZPickingList)).value(SysQuery::value(NoYes::Yes)); break; case CredManDocumentStatusCheck::PackingSlip: qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZPackingSlip)).value(SysQuery::value(NoYes::Yes)); break; case CredManDocumentStatusCheck::WHSShipment: qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZWHSShipment)).value(SysQuery::value(NoYes::Yes)); break; case CredManDocumentStatusCheck::Invoice: qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZInvoice)).value(SysQuery::value(NoYes::Yes)); break; default: break; } qbdsMCRHoldCodeTable.addRange(fieldNum(MCRHoldCodeTable, SAZHoldCodeRule)).value(SysQuery::valueNot(SAZHoldCodeRule::None)); return query; }
This blog is contains coding reference related to Microsoft AX 2012 and D365 finance and operations and Power platform
Sunday, April 11, 2021
Query run with dynamic ranges
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment