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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to convert display methods into fields in ax2012

(0) ShareShare
ReportReport
Posted on by 43

Dear great minds i want to convert this display method into field for PurchLine grid in ax2012 particularly i am facing issue to set condition where to set this condition ?

[SysClientCacheDataMethodAttribute(true)]
display PurchLineShowItemName itemName()
{
    PurchLineShowItemName purchLineShowItemName;

    if (this.ItemId)
    {
        purchLineShowItemName = this.inventTable().itemName(this.inventDim());
    }
    else
    {
        purchLineShowItemName = this.Name;
    }

    return purchLineShowItemName;
}
I have the same question (0)
  • nathanclouse Profile Picture
    30 on at

    Hey Wajahat, are you asking how you create a display method in F&O or how you write a database upgrade script to use when upgrading an AX2012 database into F&O?

  • Wajahat wasti Profile Picture
    43 on at

    No my question is i have code written on display method i want to convert it into field to show on PurchLine grid ..We can do it by using quries and views but having trouble to set the condition above .Where can i write code for condition ?....

  • GirishS Profile Picture
    27,843 Moderator on at

    Hi Wajahat Wasti,

    If you need to convert a display method to field you need to add a table that contains "PurchLineShowItemName" field value to the form datasource and add the join source with already existing datasource.

    Thanks,

    Girish S.

  • Suggested answer
    Deepak Agarwal Profile Picture
    9,039 on at

    Hi,

    On which table this method is written and on which form you want to add this as field.

    Ideally, if the table is part of datasoruce on form, you should be able to add a string in design and set 'data source' and 'data method' property to convert this as field. In case you are not getting drop down in 'data method' property you can type 'PurchLineShowItemName'  manually.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 671

#2
André Arnaud de Calavon Profile Picture

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

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 589 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans