Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

Posted on by 508

Hi DAXers,

I am here again for one more related question.

In this request, from the ReqTransPo form, I want to take InventDim.ConfigId that available in tab "General" and ReqTransSettled.RefId that available in the grid under tab page "begging" to be shown in the Grid in ReqTransPOListPage to show either Sales Order or Purchase Order # "Reference Number" not only Planned Production Order #.

Planned-Production-Orders.png

Both ReqTrans and InventDim tables are related to ReqPO which is the main table in the form's query. but when I am trying to add RefId from other tables, it shows only the same ReqPO.RefId.

Here also it is possible to create a display method to show these fields, but I need to be able to filter and search using any of them.

Regards,

*This post is locked for comments

  • Suggested answer
    iamatul Profile Picture
    iamatul 5 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Hi Mahmoud, Many thanks for the solution it is working fine and below is formatted code to get Planned Production order pegging records in D365 F&O. 

    public display InventTransRefId cplRefID()
    {
        ReqTrans reqTrans,reqTransSettled;
        ReqTransCov reqTransCov;
        
        select reqTrans
        where reqTrans.RefId == this.RefId
        && ReqTrans.RefType == this.RefType
        && reqTrans.PlanVersion == this.PlanVersion
        join reqTransCov
        where reqTransCov.ReceiptRecId == reqTrans.RecId
        join reqTransSettled
        where reqTransSettled.RecId == reqTransCov.IssueRecId;
        
        if (reqTrans.RefId != '')
        {
            return reqTransSettled.RefId;
        }
    }

    Many Thanks, Atul Kumar

  • Mahmoud Dawoud Profile Picture
    Mahmoud Dawoud 5 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    REQPO.PLANVERSION = REQTRANS.PLANVERSION AND REQPO.REFTYPE = REQTRANS.REFTYPE AND REQPO.REFID = REQTRANS.REFID

    then

    REQTRANS.RECID = REQTRANSCOV.RECEIPTRECID  where direction = 1

    then  REQTRANSCOV.ISSUERECID = REQTRANS.RECID

    you should join reqtrans Twice

  • Ahmed Siliem Profile Picture
    Ahmed Siliem 508 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Anyone can help me here?

  • Ahmed Siliem Profile Picture
    Ahmed Siliem 508 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Hi Andre,

    The datasource is already available in the query under different name "ReqTrans" that sourced from ReqTrans Table, which also is the source of the targeted ReqtransSittled datasource that fet the SO number that I need, but when I am trying to use the same field it shows Production order number.

    I do not know what is the different between ReqTrans and ReqTransSittled datasources??

    If possible, would you mind providing me more explanation. Please?

    Regards,

  • Ahmed Siliem Profile Picture
    Ahmed Siliem 508 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Thanks Zain,

    For "why not convince users to use a report? Why do they want to see it in the form?" It is very Important to control the priority of Planned production Orders to firm the required lines based on SO or manual Planned Production Order.

    As for your suggested solution, the matter is ReqTransSettled datasource sourced from ReqTrans table which already available in the ReqTrans datasource in ReqTransPOListPage. I do not know where is the problem!!

    What do you mean by "with relative constraints" this may add more light to see the road.

    Regards,

  • Suggested answer
    Zain Bokhari Profile Picture
    Zain Bokhari 3,208 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    You're welcome Ahmed,

    By the way, if they just need to see a list, why not convince users to use a report? Why do they want to see it in the form? It will not be a good solution design.

    About the query: You can add datasource(ReqTransSettled as on details page) for Pegging lines to your Query for listpage and with relative constraints then you'll be able to show data from both, PR and pegging lines. You can compare both Queries from the Listpage(ReqTransPOListPage) and the details page.

  • Ahmed Siliem Profile Picture
    Ahmed Siliem 508 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Hi Zain,

    Thanks for your response.

    I know Pegging can have multiple records and that what I am talking about. I need to show the Reference Number even if it will come in deferent lines with exact quantity for each line.

    So, the question now is; how to extend the query used on the list page with related datasources?

  • Zain Bokhari Profile Picture
    Zain Bokhari 3,208 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    and Pegging can have multiple records correct? if so, then you cannot show one PRE line with all numbers from Pegging. You will have to follow Andre's suggestion for that, and if I'm not wrong, it will cause you to see multiple lines with same PRE number if there are multiple lines in Pegging for it.

  • Zain Bokhari Profile Picture
    Zain Bokhari 3,208 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    Hi,

    To view the values from dimensions (InventDim) you just need to enable them like this.

    Screenshot-_2800_4_2900_.png

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: How to show ReqTransSettled.RefId and InventDim.ConfigId in the Grid in ReqTransPOListPage?

    HI Ahmed,

    If you need to be able to filter on the fields, you need to extend the query used on the list page with related datasources .

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans