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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Adding Display Method ...
Finance forum

Adding Display Method On A Form (the Table is Created From Scratch)

(0) ShareShare
ReportReport
Posted on by 61

Good Evening,

I Have the Following Scenario i have created a new table and there is two display methods on it as show in the attached figures then i created an extension from the HcmWorker Form and added the newly created table as a datasource but unfortunately i can't add my methods on it 

0508.PNG

8228.PNG

the total remaining is real so i created a real control

i have tried the following scenario as it's done in the Table Extension when we need to add a new method and then attach it to the form but it didn't work

6567.PNG

5554.PNG

any suggestion ?

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    1) Put the display method in your table, not table extension class. No need to create extension if it's your own table.

    2) Display method should not be static

    3) In form control, you can now set DataSource property to point to your table (data source), and DataMethod property to your display method name.

    Check this link for documentation on how to create a display method. Although it's for AX2012, in this particular case there's no difference.

    docs.microsoft.com/.../using-the-display-method-modifier

  • Omar Hesham Profile Picture
    61 on at

    Dear Nikolaos  i have done what i have illustrated in my post after i have did what you said, but this may take me to a question when i go to the datamethod property am i supposed to write the name or there should be a drop down list to choose from it as the list is empty

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You should see it in dropdown once you have developed the display method correctly.

  • Omar Hesham Profile Picture
    61 on at

    dear Nikolaos

    when I try to make my method static i got the following error 'conflicting modifiers static display'

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Like I wrote, it should not be static. Look at the examples from the documentation I linked.

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    And please share your display method code (from our table) with us if you still have issues.

  • Omar Hesham Profile Picture
    61 on at

    i have followed the link and here is a print screen of my code and i still can't find it

    i have followed the link and here is a print screen of my code and i still can't find it  and by the way this happens on every customized table i have.

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Does it work if you remove the "_this" parameter from the method signature? It's not used and you should not have it.

    As you know, you can't pass any parameters when you select a display method for a form control. So the lookup in the form control doesn't show methods which can't be called from it.

  • Omar Hesham Profile Picture
    61 on at

    no it doesn't work either and by the way i just added it to follow the link you provided

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    Ok. If you forget the lookup for now and just type the method name in the form control, does it work?

    Also please try to check some standard display methods and how they are used on a form.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans