Notifications
Announcements
No record found.
[ExtensionOf(formStr(LedgerAllocationRequest))] final class LedgerAllocationRequest_Frm_Extension { public void init() { next init(); this.design().controlName(formControlStr(LedgerAllocationRequest, editRuleID)).mandatory(false); } }
You are trying to dig a hole (or tunnel) that seems to have no end. The standard Dynamics classes and logic will not allow you to proceed without an allocation rule ID.
The LedgerAllocationProcessRequest class will return a warning— "No record found for the source" — if no rule ID is provided.
LedgerAllocationProcessRequest
I suggest going back to the person who requested this work and asking for the business reason behind it. What exactly are they trying to achieve with such a customization? Remember, coding is not the answer to every problem.
[ExtensionOf(formStr(LedgerAllocationRequest))] final class LedgerAllocationRequest_Frm_Extension { public void init() { next init(); FormStringControl formRuleId = this.design().controlName(formControlStr(LedgerAllocationRequest, editRuleID)) as FormStringControl; formRuleId.mandatory(false); } }
public void init() { next init(); editRuleID.mandatory(false); }
[ExtensionOf(formStr(LedgerAllocationRequest))] final class LedgerAllocationRequest_Frm_Extension { public void init() { next init(); FormStringControl formRuleId = this.design().controlName(formControlStr(LedgerAllocationRequest, editRuleID)) as FormStringControl; formRuleId.mandatory(false); } protected boolean validateAllocationRule() { boolean ret = next validateAllocationRule(); ret = true; return ret; } }
runOperation()
ruleId
LedgerAllocationRequest req = LedgerAllocationRequest::construct(); // Initialize parameters (as if the user filled the dialog) req.initParameters( 'HR', // ruleId //use your own, it is from USMF Data today(), // asOfDate today(), // glPostDate LedgerAllocationZeroSourceMode::Process, // zeroSource LedgerAllocationProcessMode::ProposalOnly, // processOptions 22565420926, // reasonRefRecId//get it from ReasonTable today() // releaseDate ); // Optionally set FinTagRecId //req.parmFinTagRecId(5637150000); // I am not using Financial Tags, you can if you need to, get the correct value // Run the operation directly, bypassing the UI req.run();//req.runOperation(); will show Progress dialog // Calls run() -> allocate() info("Ledger Allocation executed.");
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader