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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Display method value on to a field

(0) ShareShare
ReportReport
Posted on by 204
Hi,
I have a display method control on one form: TestDisplay()
I have field on another form TestField. 
I need the values from display method to appear on that field. 
Both are from same table.

How can I get values from display method to store into a field?
I have the same question (0)
  • Suggested answer
    Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi Community User,
     
    Did you try to put on the init method of the form
    Table.Field = Table.displayMethod()?
     
    And if the value of the display method might change while the form is open, then what values does this display method depend on? Is it on fields in the same table? Then maybe add the same logic in modified methods of those fields

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    302,654 Super User 2026 Season 1 on at
    Hi,
     
    You would need to decide if the value in the display method should become a field in the database or if you then will store redundant data. In case you have a requirement to have the same display method on different forms, you can also create the display method on the table. Then on both the forms, you have the same calculation for the display field.
  • RSX Profile Picture
    204 on at
    Hi Andre, I want the value in display method to become a field in data base. 

    Layan, I've tried that in the init method of the form, but it is not working. It shows blank values only. 
  • André Arnaud de Calavon Profile Picture
    302,654 Super User 2026 Season 1 on at
    Hi RSX,
     
    If you need a field in the database, you can go for a table extension with help of development. In case you now only have a display method on the form, you can create a runnable class and copy the code of the form display method and use it in the runnable class. 
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    First thing is a display method value is generated on run time. Means when form is rendered to user, then only it will generate. So, to use a display method like your field, you need to make some batch job to run, or if it is possible, then via form datasources you can get the value. If this is also not possible, then you can write code in init in such a way that you should use same select statement like what the display method is using.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,061 Super User 2026 Season 1 on at
     
    Try to use edit method, maybe it handles your case:
     
     
    public edit ReasonCode editBlockedReasonCode(boolean set, ReasonCode _reasonCode)
        {
            VendOnHoldHistory vendOnHoldHistory;
    
            if (set)
            {
                ttsbegin;
                vendOnHoldHistory = VendOnHoldHistory::find(this.AccountNum, true);
                vendOnHoldHistory.ReasonCode = _reasonCode;
                vendOnHoldHistory.update();
                ttscommit;
            }
            else
            {
                _reasonCode = VendOnHoldHistory::find(this.AccountNum).ReasonCode;
            }
    
            return _reasonCode;
        }
    Thanks 
    Waed Ayyad
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 679 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 332 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 238 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans