Enable custom fields on DS

DictTable dictTable = new DictTable(tableNum(LedgerJournalTrans)); DictField dictField; int counter, fieldId; ; if (ledgerJournalTable.Posted || ledgerJournalTable.Approver || LedgerJournalTrans.PaymentStatus == CustVendPaymStatus::Sent) { LedgerJournalTrans_ds.allowEdit(true); LedgerJournalTrans_ds.object(60053).allowEdit(true); for (counter = 1; counter <= dictTable.fieldCnt(); counter++) { fieldId = dictTable.fieldCnt2Id(counter); dictField = new DictField(tableNum(LedgerJournalTrans), fieldId); if (!dictField.isSystem() && dictField.id() != 60053) LedgerJournalTrans_ds.object(dictField.id()).allowEdit(false); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.