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)

How to get value of a field present in form ?

(0) ShareShare
ReportReport
Posted on by

I want to use  value  in a field of a form in X++ code. How can i achieve that?  

For ex : 1004.Capture.PNG

Here i want to use value of main account's value in code ( in modified method). 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    should i use StringEdit.text()

  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Hi Sagar U,

    You should avoid refereing to controls directly. Usually controls have datasource field linked to them and you should use this field in your code, if control is unbound there should be a display method behind and you can use it to retrieve a value.

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Right click > Personalize > the bottom right corner should tell you what form datasource, table, field and/or display method is being used on that control.

    Ideally you would want to refer the table buffer and the field if it is a bound countrol like Ievgen has mentioend, or the display method (which could be implemented either on the form datasource, or on the table behind).

    If it is an unbound control, you need AutoDeclaration = Yes set for the control, then you could use the value as you have mentioned directly from the form control.

  • Community Member Profile Picture
    on at

    Thanks for helping

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