Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Combobox item is being reset to Default value

Posted on by 330

Hi,

I have two comboboxes in my form- Journal type and Posting Layer. 

When I make a selection in the first combobox i.e. Journal type, to "Allocation" and make a selection in the second combobox i.e, Posting Layer, to other than default ("Current"), it should be remembered.

Then if I change the Journal Type to other and when I again change it to "Allocation", the item in Posting Layer combobox should not be reset to its Default value.

It should be the one which I had selected previously.

Presently it is being reset to default value.

Please suggest what I have to do for this.

Thanks in advance.

*This post is locked for comments

  • Yunus Shaik Profile Picture
    Yunus Shaik 330 on at
    RE: Combobox item is being reset to Default value

    Hi,

    I have enabled the Posting layer field for Allocation journal type.

    Yes you are right, I think this is the standard behavior and we cant change it.

    Thanks.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,219 Super User 2024 Season 2 on at
    RE: Combobox item is being reset to Default value

    Hi Yunus,

    I was already thinking of this form, but was not sure. This is standard behavior on this form. In my environment the Posting layer field is not editable when the Journal type is set to Allocation.

  • Yunus Shaik Profile Picture
    Yunus Shaik 330 on at
    RE: Combobox item is being reset to Default value

    The name of the form is LedgerJournalSetup

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,219 Super User 2024 Season 2 on at
    RE: Combobox item is being reset to Default value

    Hi Yunus,

    You would help yourself if you mention the form name. Then we can advise where it is and what to do.

  • Yunus Shaik Profile Picture
    Yunus Shaik 330 on at
    RE: Combobox item is being reset to Default value

    Hi,

    It is an existing form and the combobox does not have any associated modified field method.

    I think I have to override the modified method of combobox for avoiding the selection to be reset.

    Please suggest and let me know if there is any built in class for remembering the selection of a combobox item.

    Thanks.

  • Suggested answer
    Faisal Fareed Profile Picture
    Faisal Fareed 10,794 User Group Leader on at
    RE: Combobox item is being reset to Default value

    Hi Yunus,

    Is it a new form with fields binded with new table or did you modify anything on existing form? It seems that there is some code written on modified field method of combo boxes or at the modified field method of datasource fields binded with these combo boxes. Which is changing your selected values on form refresh. You can also check in form init() method, there might be a case values for these combo boxes are setting there too.

  • Abhishek_mishra Profile Picture
    Abhishek_mishra 405 on at
    RE: Combobox item is being reset to Default value

    Seems logical issue. Please debug you code.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,219 Super User 2024 Season 2 on at
    RE: Combobox item is being reset to Default value

    Hi Yunus,

    Have you created an new form or are you referring to an existing form? If it is a new form, do you have used an existing or new table? Please provide some more details.

  • Martin Dráb Profile Picture
    Martin Dráb 230,056 Most Valuable Professional on at
    RE: Combobox item is being reset to Default value

    What's your current logic for changing Posting Layer? (Because fields don't change values by themselves.)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans