web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Field value initializing to initial value even after changing the value

(0) ShareShare
ReportReport
Posted on by 640

Hi All,

 I've trying with SysOperationFramework with DataContract, Controller, Service and a UI builder class.

I've a integer field on dialog which is initially loaded with the value '0' by default. I've created a method in UI builder class whenever the value of this field modified, some of the controls from the dialog should enable/disable. Whenever I change the value of the integer field some of the other controls on the dialog enabling but, even after changing the integer field value it's remains the default value.

Can anybody help me out to solve this issue.

Thanks & Regards,

Kedharnath Dande.

*This post is locked for comments

I have the same question (0)
  • Iulian Cordobin Profile Picture
    8,201 on at
    RE: Field value initializing to initial value even after changing the value

    So, to recap, you have created a custom UIBuilder class and override the modified event by using the registerOverrideMethod on the integer field, right?

    And at this point the code is not working properly: the integer value is changed back to 0, after you have changed it manually to another value in the dialog?

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Yes, Iulian.

    Can you just help me out to resolve this issue.

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi Iulian.

    Can you just go through once on this issue also.

    community.dynamics.com/.../492526

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi Iulian,
    Please find the below screenshots.

    Dialog:

    UI-Builder.jpg

    PostBuild():

    UI-Builder.jpg

    Modify method:

    Modify-method.jpg

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at
    RE: Field value initializing to initial value even after changing the value

    So what is the field that is getting its value reset? Is it the HierarchyLevel?

    I can see that you are overRiding both Hierarchy level field and AllocationKey field modified methods. In the modified of the HierarchyLevel I can see you are reseting the value of the AllocationKey.

    I suspect you have a problem in this area, the code for the modified method for the AllocationKey (can you show it also) is reseting the value of the Hierarchy.

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi Iulian,

    Basically the field not persisting the value whichever we select. So, Whenever I enter the value in hierarchy level, its resetting after pressing tab and even I AllocationKey also same,

    it's a dropdown and whenever I made selection its not selecting. That's the reason why it's not working.

    One more radio button I've in  a dialog 'Add' and 'Remove'. For this radio button control also it's happening same. Even if select the remove the control is placing over 'Add'. Because 'Add' is initially selected.

    If you want I'll send you override method for all these 3 fields.

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    modify allocation key:

    Modify-allocation-key.png

    modify hierarchy level:

    Modify-hierarchy-level.png

    modify years:

    Modify-years.jpg

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi Iulian,

    Please guide me in resolving this issue.

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi All,

    Does anyone have idea about this strange behaviour.

    Please suggest or guide me something.

  • Kedar Dande Profile Picture
    640 on at
    RE: Field value initializing to initial value even after changing the value

    Hi Guys,

    Identified the issue and after adding return types to the method resolved issue.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans