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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Display method on DataSource shows no data.

(0) ShareShare
ReportReport
Posted on by

Hello,

I'm pretty new in X++ - work in AX 2009.

I'm trying to display data from ProdRouteJob.Location (new field) in JmgJobBundleProdFeedback Form - I add datasource ProdRouteJob and extend the field Grid. When I init Form JmgJobBundleProdFeedback - I see no data in column Location. I tried to write display method on Form like this but without success:

display str get_location(JmgTmpJobBundleProdFeedback _jmgTmpJobBundleProdFeedback)
{
ProdRouteJob prd;
;
select location from prd where prd.JobId == _jmgTmpJobBundleProdFeedback.JobID;

return prd.location;
}

Can you help me?

Many thanks

Ivo

*This post is locked for comments

I have the same question (0)
  • Zain Bokhari Profile Picture
    3,208 Moderator on at

    Hi,

    Display methods are written on the form Data sources or the Tables directly.

    Please do a little research and then if you still don't succeed you can come here and post the exact problem.

    Refer to this link too.

  • Community Member Profile Picture
    on at

    Hi, sorry for late answer,  - I read that article (and lot more), but its not what I want to do:  I want create display method on Form datasource, not on table. But is method creation on table necessary to use it on datasource?  

    Edit: my problem ist that code I use above, display nothing. 

    Thank you

  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    No its not necessary you can add display method on datasources. The method you wrote should work fine, this is how you create it.

    The only possible reason this method doesn't return a value in my opinion would be the case where there is no data available, (check that the relevant data exists), or one reason could be that the datasource you're trying to add this method to has some grouping on it. Please check these two things.

  • Community Member Profile Picture
    on at

    Thank you verry much. It was by grouping on datasource.

    Best regards!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
GiacomoRovai Profile Picture

GiacomoRovai 4

#3
Douglas Noel Profile Picture

Douglas Noel 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans