Re: Power Pages button help
Hi @ddanna567 ,
Assuming you've already added a button to each of your (Case Details) Web Page, let say like this:
<button id="casedocuments">Case Documents</button>
Here is one of the ways, you can get/set button id based on your record id:
$(document).ready(function () {
//Get Current Case Id (Opened)
var caseId = '{{ request.params['id'] }}';
// Select the button by its current ID and update the 'id' attribute
var formattedId = "casedocuments-id"+ caseId;
$("#casedocuments").attr("id", caseId);
});
Please note, there are other ways too, you can even create a button dynamically instead of changing button id on page load.
Feel free to reach out, if you have any question.
Thanks,
Saud
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.