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 :
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,304 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.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    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

  • Govinda Kumar Profile Picture
    2,304 Moderator on at

    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.

  • Verified answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    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,304 Moderator on at

    Thanks Daniel Incalza, Thank you for the answer.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans