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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Assign a value to a dropdown lookup box on a form.

(0) ShareShare
ReportReport
Posted on by 272

I created an additional new button in Sales Agreement (creating new record). Where if it's the one clicked, the Agreement Classification value will have a certain value. I've already done detecting if that button is clicked, now what I am trying to do is assign a value on AgreementClassification, where it is a dropdown box that has a lookup method. (in its field on its table)

7457.pic.PNG

What I did is assigned a value when the form is loaded on the run() method.

I tried doing: 

SalesAgreementHeader_AgreementClassification1.value(5637144580);

where 5637144580 is the recId of that value. I used .value because the form object doesn't have .text and it doesn't work.

How can I assign a default value to that dropdown box?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,093 Most Valuable Professional on at

    The control is bound to a datasource, therefore you should change the backing datasource field and not the control itself. Like this: salesAgreementHeader.AgreementClassification1 = 5637144580.

  • Miguel Zuniga Profile Picture
    272 on at

    Thanks Martin!

    using salesAgreementHeader.AgreementClassification = 5637144580; worked for me.

  • Miguel Zuniga Profile Picture
    272 on at

    Martin, I am getting the value "unknown". Sometimes it is the value, sometimes it's unknown.  What could be the problem?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans