I want to use value in a field of a form in X++ code. How can i achieve that?
For ex :
Here i want to use value of main account's value in code ( in modified method).
*This post is locked for comments
I want to use value in a field of a form in X++ code. How can i achieve that?
For ex :
Here i want to use value of main account's value in code ( in modified method).
*This post is locked for comments
Thanks for helping
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.
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.
should i use StringEdit.text()
André Arnaud de Cal...
293,138
Super User 2025 Season 1
Martin Dráb
231,895
Most Valuable Professional
nmaenpaa
101,156
Moderator