cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iwaldman
Helper II
Helper II

Append Record Id to Button component link to a page

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
iwaldman
Helper II
Helper II

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!

View solution in original post

4 REPLIES 4
NatGeo
Resolver I
Resolver I

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

iwaldman
Helper II
Helper II

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.

NatGeo
Resolver I
Resolver I

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
Helper II
Helper II

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!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,638)