web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Page Retrieve r...
Power Apps
Unanswered

Custom Page Retrieve record

(0) ShareShare
ReportReport
Posted on by 27

 

 

 

Hi, 

 

I want to open a custom page with a record context. The custom page opens but it does not retrieve the record.  How can I fix it? 

 

function RunOnSelected(executionContext) {

var formContext = executionContext.getFormContext();
var record = formContext.data.entity.getId();


// Centered Dialog
var pageInput = {
 pageType: "custom",
 name: "xxx_xxx_xxxx",
 entityName: formContext.data.entity.getEntityName(),
 recordId: record,

};
var navigationOptions = {
 target: 2,
 position: 2,
 width: { value: 500, unit: "px" },
 title: "My Page"
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
 .then(
 function () {
 // Called when the dialog closes
 }
 ).catch(
 function (error) {
 // Handle error
 }
 );
 }

I have used the following formula in App "OnStart": 

Set(RecordItem, 
 If(IsBlank(Param("recordId")),
 Blank(),
 LookUp('My Table', 'Process Id' = GUID(Param("recordId"))))
 )

 

Thanks

Categories:
I have the same question (0)
  • HamidBee Profile Picture
    932 Super User 2024 Season 1 on at

    The problem you are encountering is because you are trying to pass the record ID to the custom page, but the page is not able to retrieve the record using that ID.

    There are a few things you can check to try and resolve this issue:

    1. Verify that the custom page you are trying to open has been properly configured to retrieve the record using the passed ID. You can check that the custom page has a formula similar to the one you provided in the "OnStart" property of your app, which uses the Param("recordId") to retrieve the record.

    2. Make sure that the value you are passing for the "recordId" property in the pageInput variable is the correct format. It should be a string representation of the GUID of the record, not the record object itself.

    3. Verify that the "My Table" Data source, the one you are using to retrieve the record, is correctly configured in your app. Make sure that the data source is correctly referenced and the columns are correctly mapped.

    4. Check if the custom page has the correct permissions to access the data.

    5. Check if the custom page has the correct settings, in case it's set to private.

    It might also be helpful to check the browser's console for any error messages that may give more insights on the problem.

     

     

    If my reply helped you, please give a 👍, & if it solved your issue, please 👍& Accept it as the Solution to help other community members find it more.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard