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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Selected lead Guid sho...
Power Apps
Unanswered

Selected lead Guid show in custom page

(0) ShareShare
ReportReport
Posted on by 10

 

 

Hi Team,

    Canvas app added a dataverse table lead and contact.created custom page in this custom show the selected lead and account GUID.

Lead and account added button using js code passed the custom page.

When user select lead  and click on button custom page will open in this show selected lead guid will be apper.

 

How can get selected record GUID.

I used  below formula in canvas App onstart =

          Set(varCurrentRecordID,Substitute(Substitute(Param("recordId"),"{",""),"}",""));

 

but unable to get the guid please provide correct formula my requirement.

 

Thanks in advance for quick response....!

 

 

 

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @Powerappsuser14 

    If you are passing the parameter correctly from JS you can use this formula

     

     

     

     

    Set(_thisRecord,
     If(IsBlank(Param("recordId")),
     Blank(),
     LookUp(
     contact,
     contacid = GUID(Param("recordId"))
     )
     )
    );

     

     

     

     

     

     

     

    this.navigate = function (primaryControl) {
     formContext = primaryControl;
     let entity_Id = formContext.data.entity.getId().replace('{', '').replace('}', '');
     console.log('entity_Id: ' + entity_Id); // Correctly logs GUID of Entity A parent record
     let pageInput = {
     pageType: "custom",
     name: "my_customPage",
     entityName: formContext.data.entity.getEntityName(),
     recordId: entity_Id // Passing the GUID of Entity parent record
     };
     let navigationOptions = {
     target: 2,
     position: 1,
     height: 600,
     width: 800,
     title: ""
     };
     Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
     function success() {
     console.log("Success");
     },
     function error() {
     console.log("error");
     }
     );
     }

     

     

     

     

    You must obtain the recordid of the custom page from the JS

     

    remember to place it this way in your JS load

    Jmanriquerios_1-1719481518701.png

     

     

     

  • Powerappsuser14 Profile Picture
    10 on at

    Hi @Jmanriquerios 

     

    Thanks for quick respond...!

     

       My issue is selected record guid not available.

    App onstart =

    Set(varCurrentRecord,Param("recordId"));
    how can get the selected record guid dynamically .
     
    Please Help
  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @Powerappsuser14 

     

    then you must change the primary control for the control that I show you
    I understand that you want to call the custom page from a view by selecting a record

     

    Jmanriquerios_0-1719487851558.png

    Jmanriquerios_1-1719487919327.png

     

     

     

     

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard