Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

How to pass the Current Record/Variable from master page to the Page Part?

Posted on by 2,195 Super User

Hi, community.

There is a requirement, I have created a query and page (Page A) when it opens it gets the data from the query and inserts it into the temp table that I'm using as a data source on the current page.

On the same page, I have linked another List Part Page (Page B) that is using another query, on the open page trigger I'm inserting the data from the query it is working fine but I want to filter the query before inserting the data I mean I want to filter the query based on the Record from the above Page A and then only show the specific records using SubPageLink.

Page A screenshot

pastedimage1673514068654v1.png

As you can see I'm filtering the query before inserting it and I'm getting the BatchID from one more page OnAction trigger.

Same thing I want to do for the other list part page. (Page B)

pastedimage1673513005526v2.png

To do this I have to somehow pass the "ID" from Page A to the Page B

As you can see I don't have the option to pass the variable in the part section.

pastedimage1673513105345v3.png

Kindly help.

Thanks and Regards.

Categories:
  • Govinda Kumar Profile Picture
    Govinda Kumar 2,195 Super User on at
    RE: How to pass the Current Record/Variable from master page to the Page Part?

    Thanks Daniel Incalza, Thank you for the answer.

  • Verified answer
    DAnny3211 Profile Picture
    DAnny3211 9,184 Super User on at
    RE: How to pass the Current Record/Variable from master page to the Page Part?

    ok clear

    in the onopenpage of the main page

    insert this code:

    CurrPage.Castlist.PAGE.getBatchID(yourid);

    where Castlist I assume is the name of your subform

    check my answer if it helped you, thanks

    DAniele

  • Govinda Kumar Profile Picture
    Govinda Kumar 2,195 Super User on at
    RE: How to pass the Current Record/Variable from master page to the Page Part?

    Hi DAniele thanks for replying

    This is my main table on the action I'm passing the current record into Page A so that I can filter the query before inserting it.

    2318.png

    This is my page and I'm getting the data from the query and using tmp table.. as you can see I have another group called cat list and inside that group, I have a list part page (page B) and that page also uses temp table as a data source while inserting data using another query.. 

    4201.png

    The only condition is that I want to use the same source ID to filter the query before inserting.. same as I did for page A.

    but I cannot get that source ID on page B... how to get the source ID in my list part page(Page B) from Page A or the main page.

    Kindly tell me what's the best possible solution.

    Thanks.

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,184 Super User on at
    RE: How to pass the Current Record/Variable from master page to the Page Part?

    hi

    you can also share the screenshot of the page as seen from the browser

    although I think that using two temporary ones is not feasible what you want to do

    DAniele

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans