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 :
Microsoft Dynamics AX (Archived)

Combining columns on grid view from two different tables

(0) ShareShare
ReportReport
Posted on by 1,450

Greetings! I have a request for direction on a project I'm working on.

We have a Customer PO# on our Sales table and we have that added on the production order list. Now, today, I'm adding a PO# to transfer orders and am creating production orders from a transfer order line. Production orders are creating fine, but the issue is combining the two PO columns into one column on the grid. Example would be 1 record in the grid was created from an SO so the PO# column would need to come from the SO header, but the next production order was created from a transfer line and the PO# column would need to come from the Transfer order.

I could easily accomplish this with a display view, but the requirement is for it to be sortable and filterable. I think I could also do this by creating a query and then using computed columns in a view and adding the view as a data source. I just feel like this would add a lot of overhead and kill performance on the form.

Does anyone have any suggestions of a path to take? I'm drawing a blank.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    cpironmo Profile Picture
    2 on at

    Hi I'm a little confused, which grid are you having trouble with? I'm guessing the ProdTable grid. I'll suppose that you have a field added named something like CustomerRef (based on same EDT) and you populate this when creating the production order.

    You can write the logic in a method on the ProdTable in the initValue method so you will be able to determine the args.record() or args.caller() and act accordingly.

    Alternatively if your code is creating the production order then create two separate methods on ProdTable called initFromTransferOrder and initFromSalesOrder then based on the same args object values call the relevant method which will set the CustomerRef value correctly.

    I'd also look at adding a field which linked back to the creating object for completeness.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans