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)

Autopopulate a field within a form with the top value of a dropdown list

(0) ShareShare
ReportReport
Posted on by

I have a dropdown within form that for the most part always has one option within it. Because of this I'd like for it to just automatically select the first option within the dropdown. It's the LedgerJournalTransVendPaym form and I'm trying to auto populate the Payment Specification field within the form. The datasource is the LedgerJournalTrans table 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    In case there is a query behind in a lookup method, couldn't you just create an instance of that query using the same code, and fetching the first record from the QueryRun object, then assign the value to the form control / table field during the create() call of the record (on the form datasource)?

    If the lookup is not with code but bound to a table via relations, then just fetch the first record on the table and again assign the value in create().

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