Announcements
I've tried to add dimension entry no ds in EcoResProductCreate form and add following code in post init/OnPostRun, and dimension entry is not shown.
However, dimension entry is shown in newly created form.
DimensionEntryControl dimensionEntryValues; dimensionEntryValues = formRun.design().controlName("DimensionEntryControlNoDS"); dimensionEntryValues.parmNonActiveValueErrorTolerance(ErrorTolerance::Error); dimensionEntryValues.parmDisplayValues(true); dimensionEntryValues.reactivate(); dimensionEntryValues.loadAttributeValueSet(22565463051);
Hi André Arnaud de Calavon,
I cannot mark my answer. Form parts is solved.
I did the same by adding formpart it is showing but how can i get the value of dimension from formpart on OK of ecoresproductcreate form.
Hi Tony,
Thanks for your update. It is solved now? If so, can you tell what changes you made to make it work for you?
André Arnaud de Calavon,
It should be the same. And, finally, form parts is solved.
Hi Tony,
I do suspect there is a small difference. Did you add the dimension entry control as extension on your new form like the released products? Have you used the debugger to check what is happening in detail? Have you also tried it using a Chain of Commands instead if the post handler?
Hi Judy,
I've added the code in EcoResProductCreate_Post_init and dimension entry is not shown but the it is shown in newly created form.
Hi André Arnaud de Calavon,
I added the code in Post_init of EcoResProductCreate form as below,
[PostHandlerFor(formStr(EcoResProductCreate), formMethodStr(EcoResProductCreate, init))] public static void EcoResProductCreate_Post_init(XppPrePostArgs args) { FormRun fr = args.getThis(); DimensionEntryControl dimensionEntryValues; dimensionEntryValues = fr.design().controlName("DimensionEntryControlNoDS"); dimensionEntryValues.parmNonActiveValueErrorTolerance(ErrorTolerance::Error); dimensionEntryValues.parmDisplayValues(true); dimensionEntryValues.reactivate(); }
Dimension entry no DS in the form extension EcoResProductCreate and the controller class is LedgerDefaultDimensionEntryController
I added the code in Post_init of newly created from as below,
[PostHandlerFor(formStr(newForm), formMethodStr(newForm, init))] public static void newForm_Post_init(XppPrePostArgs args) { FormRun fr = args.getThis(); DimensionEntryControl dimensionEntryValues; dimensionEntryValues = fr.design().controlName("DimensionEntryControlNoDS"); dimensionEntryValues.parmNonActiveValueErrorTolerance(ErrorTolerance::Error); dimensionEntryValues.parmDisplayValues(true); dimensionEntryValues.reactivate(); }
Dimension entry no DS in the newly created form and the controller class is LedgerDefaultDimensionEntryController
Hi Tony,
Did you try to add the logic in the method init() of the form?
For the code you showed should be executed after the form is created.
regards
Hi Tony,
Can you share the full details of what you have done? This seems to be just a few lines of coding, but we can't see where you added this. Which class and method is having this coding?
What are the differences between your new form and the EcoResProductCreate form? Does your new form has a datasource or not?
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator