Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

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

(0) ShareShare
ReportReport
Posted on by 2,211 Moderator

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.

  • Govinda Kumar Profile Picture
    2,211 Moderator 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
    9,276 Moderator 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
    2,211 Moderator 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
    9,276 Moderator 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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,349 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,029 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans