Place custom button on Registration Page in Dynamics 365 Portals

Recently I had a requirement where my customer wanted to put a Cancel button in the registration screen of Dynamics 365 Portal. To explain the requirement, the OOB screen looks like below.

image

What my customer wanted was to place the Cancel button beside the Register button. So that when he clicks on the Cancel button, it should throw the user back to the login page.

So let’s see how to do it.

Step 1: Create a content snippet

Go to settings –> portals –> content snippets

Create a content snippet with Name = Account/Register/PageCopy and Type = HTML. Check for the below screenshot

image

Save the record.

 

Step 2: Write the content of the HTML to render the Cancel button

Copy and paste the below in the Value (HTML) field

$(document).ready(function () {

$submitButton = $(“#ContentContainer_MainContent_MainContent_SecureRegister”).find(“#SubmitButton”);

$submitButton.parent().append(“<input type=’button’ id=’btn_cancel’ class=’btn btn-primary’ value=’Cancel’ />”);

$(“#btn_cancel”).click(function () {

window.location.href = “https://xrmforyou.microsoftcrmportals.com&#8221;;

});

});

 

There is one trick here. If you just Copy/ Paste the above code in the HTML field, it will render as text on the Registration Page.

image

So the trick is to follow the below steps before copy/ pasting the above code.

Click on the Source Icon as highlighted below. Once you click, it becomes a HTML editor.

image

Now copy and past the above code.

Save and refresh your portal.

image

 

Hope this helps!

 

Debajit Dutta

(Dynamics MVP)

For corporate training/ consulting, please write to us at info@xrmforyou.com

Advertisements

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s