Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

Get a specific instance of a page object and assign to page variable

(1) ShareShare
ReportReport
Posted on by 25

Hi all,

I have two Pages, one being an actual Page, lets call x, and the other being a CardPart, lets call y, that sits in page x. For those wondering, x and y source tables are of same type, and the part/page are linked via primary key.

I have made it so x calls a function which is in y. The function is very simple and sets a global variable in y to the value of the argument (argument of the function). y has an action that works with the global variable, for simplicity sake lets just say it sends a message of the variable value. 

My first issue is when testing this out, I could see that the argument passed was being recognized in the called function in y, but when clicking the action, the message showing the value was empty. I figured it has something to do with different instances but could not confirm. Eventually I found that you actually can access the instance of the page part by using CurrPage.'Pagename'... -- Now with a little backstory time for my actual issue:

I am trying to get y to now interact back with x but I am having the same issue with the different instances (or so I think). Before when working in x, I could access y's instance because y is a PagePart in x, but how can I make it so in y, I can call a function in x (which is the same instance of x that y is currently in)?

Hope that was clear enough, let me know if anyone needs any clarification,

thanks,

Jaden

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans