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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Combobox item is being reset to Default value

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Martin Dráb Profile Picture
    237,892 Most Valuable Professional on at

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

  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    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.

  • Abhishek_mishra Profile Picture
    405 on at

    Seems logical issue. Please debug you code.

  • Suggested answer
    Faisal Fareed Profile Picture
    10,796 User Group Leader on at

    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.

  • Yunus Shaik Profile Picture
    330 on at

    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.

  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    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
    330 on at

    The name of the form is LedgerJournalSetup

  • André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    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
    330 on at

    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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans