Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to add financial dimension in new released product form

(0) ShareShare
ReportReport
Posted on by 577

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);

  • Tony Mok Profile Picture
    577 on at
    RE: How to add financial dimension in new released product form

    Hi André Arnaud de Calavon,

    I cannot mark my answer. Form parts is solved.

  • Verified answer
    salmanhafeez Profile Picture
    55 on at
    RE: How to add financial dimension in new released product form

    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.

  • André Arnaud de Calavon Profile Picture
    294,095 Super User 2025 Season 1 on at
    RE: How to add financial dimension in new released product 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?

  • Tony Mok Profile Picture
    577 on at
    RE: How to add financial dimension in new released product form

    André Arnaud de Calavon,

    It should be the same. And, finally, form parts is solved.

  • André Arnaud de Calavon Profile Picture
    294,095 Super User 2025 Season 1 on at
    RE: How to add financial dimension in new released product form

    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?

  • Tony Mok Profile Picture
    577 on at
    RE: How to add financial dimension in new released product form

    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.

  • Tony Mok Profile Picture
    577 on at
    RE: How to add financial dimension in new released product 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

    pastedimage1625470770581v1.png

    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

    pastedimage1625470713003v1.png

  • huijij Profile Picture
    19,811 on at
    RE: How to add financial dimension in new released product form

    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

  • André Arnaud de Calavon Profile Picture
    294,095 Super User 2025 Season 1 on at
    RE: How to add financial dimension in new released product form

    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?

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans