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)

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,286 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

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
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans