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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Save last selected value on a form

(0) ShareShare
ReportReport
Posted on by 75

I am selecting the status on a form

pastedimage1685540412651v2.png

but when I am closing the form and reopen it then it changes the value

How to save last selected value on a form

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Ashraf,

    Status field is DataSource bound or unbound control?

    If it's an unbound control, you need to use pack and unpack method on a form.

    Refer to the below blog.

    https://community.dynamics.com/ax/b/dynamicsaxsolutions/posts/save-last-value-on-on-form-form

    Thanks,

    Girish S.

  • Ashraf_ahk Profile Picture
    75 on at

    I have applied your suggested blog but it was not working

  • GirishS Profile Picture
    27,827 Moderator on at

    May be that blog doesn't show how to set value to control in the run method.

    Refer to the below blog and see if it helps.

    https://www.arbelatech.com/insights-resources/blog/get-last-selected-value-on-form-control.html

    Thanks,

    Girish S.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    You should use the debugger to find out what's going on, instead of simply saying that it doesn't work and give up.

    If you need our help, show us your code (especially unpack()) and tell us what you found when debugging your code.

  • Ashraf_ahk Profile Picture
    75 on at

    There is not any code behind that is why it is not necessary to debug the issue every time. I just added new control on a form and it was not working according to req.

    Btw I found out the issue and fixed it just by modify DS property.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Oh, you didn't say it should be a bound control (and you just forgot to bind it to a data source). We can't give you the right answer if you don't explain your problem property.

    Note that binding it to the data source doesn't necessarily meet the requirement "to show the last selected value on a form". It depends on what record is loaded from the data source and whether you mean the value last selected by the particular user or by any user.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans