Skip to main content

Notifications

Announcements

No record found.

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;
}
  • Suggested answer
    Deepak Agarwal Profile Picture
    8,566 on at
    RE: How to convert display methods into fields in ax2012

    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.

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: How to convert display methods into fields in ax2012

    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.

  • Wajahat wasti Profile Picture
    43 on at
    RE: How to convert display methods into fields in ax2012

    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 ?....

  • nathanclouse Profile Picture
    30 on at
    RE: How to convert display methods into fields in ax2012

    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?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,979 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans