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 : MlLmMZXarOuM3AB+D/6nOd
Power Pages - Customize & Extend
Answered

Append Record Id to Button component link to a page

Like (1) ShareShare
ReportReport
Posted on 22 Sep 2022 14:20:51 by 159

I have added a button component to a page.

 

Is there a way to append the record id as a query parameter to the button page link? e.g., view-cart/?id=7851618b-f039-ed11-a81b-000d3a336a33

 

iwaldman_0-1663856357227.png

 

Categories:
  • Verified answer
    iwaldman Profile Picture
    159 on 26 Sep 2022 at 17:03:55
    Re: Append Record Id to Button component link to a page

    Thanks, @NatGeo . I am overriding the onClick to make this work. I was hoping that there was an UI option to append the id. Maybe this is on the roadmap. Thanks again!

  • natalya Profile Picture
    133 on 26 Sep 2022 at 16:53:42
    Re: Append Record Id to Button component link to a page

    Hi @iwaldman,

    You can add it to URL on your button click event.

     window.location.href = `/YOUR_PARTIAL_URL?YOURid=${YourID}`

     Also if you use Advanced Form, you can go to "Form Definition" tab ->Record Source section and add your ID  that will be added to URL.  For Basic Forms, select "On Success Settings" -> Redirect. You will see different options there to add your ID to URL.

     

    Hoping it helps.

    NatGeo

  • iwaldman Profile Picture
    159 on 26 Sep 2022 at 13:22:55
    Re: Append Record Id to Button component link to a page

    Hi @NatGeo , Thanks for the response. The record id is not static; it must be dynamically appended when clicking the button. I can write JavaScript to achieve this but it seems that this should be a standard feature.

  • natalya Profile Picture
    133 on 25 Sep 2022 at 23:34:25
    Re: Append Record Id to Button component link to a page

    Hi @iwaldman,

     

    You can append the record id as a query parameter to URL, if it's acceptable in your case.

     

    Hoping it helps.

    NatGeo

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 2

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 2

#3
surya narayanan Profile Picture

surya narayanan 35

Featured topics

Loading complete