web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,397 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

  • Govinda Kumar Profile Picture
    2,304 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.

  • Verified answer
    DAnny3211 Profile Picture
    11,397 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,304 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.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,686

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 3,529 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,989 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans