Requirement: Add a custom button on Portal Page to cancel operation.
Solution: While working on Dynamics 365 portal, sometime we need to add additional buttons on the web page. We can create liquid template if we want to implement some complex logic and buttons, but if it just matter of quick custom button we can use Web Page Script area.
Let’s say we want to have Cancel button next to Submit button on custom contact page, we can simply use following steps:
1. Navigate to Web Page (Portals-> Web Pages)
2. Open the Web Page record where want to add button.
In above code InsertButton is the id of the button after whom we want to add our cancel button.
Note: Make sure to add this code to the content pages as well
4. Save and Publish your changes, we should be able to see button next to submit button