Enable/Disable a grid field in D365 FinOps

The following class is the extension of the ProdParmStartUp form in D365 F&O, where I will disable a field in the grid, based on a condition. Therefore users won’t be able to edit that field when that condition is met. *ProdParmStartUp: This form opens up on the Production order page when we click on the […]

Change field value in DP – General Journal

[ExtensionOf(classStr(LedgerJournalDP))] final class MZNNM_LedgerJournalDP_Extension { [PostHandlerFor(classStr(LedgerJournalDP), methodStr(LedgerJournalDP, processReport))] public static void LedgerJournalDP_Post_processReport(XppPrePostArgs args) { LedgerJournalDP dpInstance = args.getThis() as LedgerJournalDP; ledgerJournalTmp ledgerJournalTmp = dpInstance.getLedgerJournalTmp(); LedgerJournalTrans ledgerJournalTrans; LedgerJournalTrans_Project ledgerJournalTrans_Project; ttsbegin; while select forUpdate ledgerJournalTmp { ledgerJournalTrans.clear(); select * from ledgerJournalTrans where ledgerJournalTrans.Voucher == ledgerJournalTmp.Voucher; if(ledgerJournalTrans) { ledgerJournalTrans_Project.clear(); select * from ledgerJournalTrans_Project where ledgerJournalTrans_Project.RefRecId == ledgerJournalTrans.RecId; ledgerJournalTmp.AccountNum […]

Purchase order detail report

Contract Class: class MZNNM_InventoryStockContract { ItemId itemCode; TransDate fromDate; TransDate toDate; VendAccount vendAccount; [ DataMemberAttribute(“VendorNumber”), sysoperationlabelAttribute(literalstr(“Vendor Code”)) ] public VendAccount parmVendAccount( VendAccount _vendAccount = vendAccount) { vendAccount= _vendAccount; return vendAccount; } [ DataMemberAttribute(“ItemCode”), sysoperationlabelAttribute(literalstr(“Item Code”)) ] public ItemId parmItemCode( ItemId _itemCode= itemCode) { itemCode= _itemCode; return itemCode; } [ DataMemberAttribute(“Fromdate”), sysoperationlabelAttribute(literalstr(“From date”)) ] public TransDate […]