Showing posts with label Portals. Show all posts
Showing posts with label Portals. Show all posts

Saturday, 4 September 2021

Adding a custom button in Dynamics Portals

 

Dynamics Portals: Adding a custom button to the entity forms

Was looking into how to add a custom button to the entity form, and found this thread in the community forums:

https://community.dynamics.com/crm/f/117/t/274955

So with a little modification(class attribute of the new button element), just so the second button looks similar to the default “submit” (which is re-labelled to “Subscribe” on the screenshot below), here is the script:

$(document).ready(function(){

$(‘#UpdateButton’).after(‘<button id=”deletebutton” type=”button” class=”btn btn-primary button” style=”margin-left:10px;”><span></span> Unsubscribe</button>’);

$(“#deletebutton”).click(function(){
    $(‘#ita_subscribe_0’).attr(‘checked’, ‘checked’);
    $(‘#UpdateButton’).click();
});

}

image

Then you can do whatever you need in that onclick javascript (set field values etc), and, eventually, just pass onclick to the default UpdateButton.

Power Automate Fundamentals : Usage of ChangeSet Request in Power Automate

In certain scenarios we have to bundle multiple operations together so that all should pass or fail, in any case if one of the operations fa...