{"id":3174,"date":"2018-08-10T00:57:46","date_gmt":"2018-08-10T00:57:46","guid":{"rendered":"http:\/\/himbap.com\/blog\/?p=3174"},"modified":"2018-08-10T00:57:46","modified_gmt":"2018-08-10T00:57:46","slug":"modifying-profile-page-in-dynamics-365-portal","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=3174","title":{"rendered":"Modifying Profile Page in Dynamics 365 Portal"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nIn this article we are going to discuss how we can customize Dynamics 365 portal profile page.<\/p>\n<p><strong>Requirement<\/strong><br \/>\nLet\u2019s say we got following requirement to change profile page<br \/>\n1. Hide Parent account<br \/>\n2. Hide Manage access<br \/>\n3. Change Text to \u201cPlease make sure your personal information is up to date\u201d<br \/>\n4. Hide Email confirmation<br \/>\n5. Hide Preferred Language<br \/>\n6. Hide How can we contact you<br \/>\n7. Add a Cancel button to redirect to portal home page.<\/p>\n<p><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3175 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage1-300x248.png\" alt=\"profilepage1\" width=\"300\" height=\"248\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage1-300x248.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage1-624x517.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage1.png 658w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Solution<\/strong><br \/>\nWe can implement 1, 2,3,4,5 and 7 requirements by writing simple Jquery on the profile page and 4 and 6 can be handled by the portal site setting. Let\u2019s first disable 4 and 6<br \/>\n1. Navigate to Portals-&gt;Site Settings<br \/>\n2. Add following site settings, if not available otherwise, make sure they are set to false<\/p>\n<p><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3176\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage2-300x135.png\" alt=\"profilepage2\" width=\"300\" height=\"135\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage2-300x135.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage2.png 586w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3177\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage3-300x169.png\" alt=\"profilepage3\" width=\"300\" height=\"169\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage3-300x169.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage3.png 470w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now we need to find out ids of the fields that we want to hide, to know the id of the control, we can open profile page and right click on the control that we want to hide and select Inspect. For example\u00a0here is the id of language lookup.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3178 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage4-300x84.png\" alt=\"profilepage4\" width=\"300\" height=\"84\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage4-300x84.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage4.png 529w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nSome of the control won&#8217;t have id so we need to hide them using other attributes.<br \/>\n3. To change the text, we can navigate to Profile page content page and do changes under HTML tab<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3179 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5-300x104.png\" alt=\"profilepage5\" width=\"300\" height=\"104\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5-300x104.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5-1024x357.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5-624x217.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage5.png 1246w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n4. To hide 1,2 links we can use following jquery code<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$('a[title=&quot;Parent account&quot;]').hide();\r\n$('a[title=&quot;Manage access&quot;]').hide();\r\n<\/pre>\n<p>5. To hide language lookup we can use following jquery<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$('#adx_preferredlanguageid').closest('td').hide()\r\n<\/pre>\n<p>6. Now we need to add a cancel button, first check the Update button id so that we can put our button next to it. After that we can use following code to add Cancel button<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$('#ContentContainer_MainContent_MainContent_ContentBottom_SubmitButton').after('&lt;input type=&quot;button&quot; value=&quot;Cancel&quot; onclick=&quot;OnCancelClick()&quot; id=&quot;CancelButton&quot; class=&quot;btn btn-primary&quot;\/&gt;')\r\n<\/pre>\n<p>After all the steps are complete, jquery code should look like below<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$(document ).ready(function() {\r\n\/\/hide language lookup based on lookup id\r\n$('#adx_preferredlanguageid').closest('td').hide()\r\n\/\/hide Parent account and Manage access links\r\n$('a[title=&quot;Parent account&quot;]').hide();\r\n$('a[title=&quot;Manage access&quot;]').hide();\r\n\/\/Add cancel button next to update button\r\n$('#ContentContainer_MainContent_MainContent_ContentBottom_SubmitButton').after('&lt;input type=&quot;button&quot; value=&quot;Cancel&quot; onclick=&quot;OnCancelClick()&quot; id=&quot;CancelButton&quot; class=&quot;btn btn-primary&quot;\/&gt;')\r\n});\r\n\/\/Navigate to home page on Cancel Click\r\nfunction OnCancelClick()\r\n{\r\n    window.location.href=&quot;\/&quot;;\r\n}\r\n<\/pre>\n<p>We need to place this code under Custom Javascript section under Advance like below<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3180 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage6-300x107.png\" alt=\"profilepage6\" width=\"300\" height=\"107\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage6-300x107.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage6-624x222.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage6.png 1003w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Finally, save your changes and check profile page in portal it should look like below<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3181 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage7-300x183.png\" alt=\"profilepage7\" width=\"300\" height=\"183\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage7-300x183.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage7-624x380.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/08\/profilepage7.png 751w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this article we are going to discuss how we can customize Dynamics 365 portal profile page. Requirement Let\u2019s say we got following requirement to change profile page 1. Hide Parent account 2. Hide Manage access 3. Change Text to \u201cPlease make sure your personal information is up to date\u201d 4. Hide Email confirmation 5. Hide Preferred Language 6&#8230;. <a href=\"https:\/\/himbap.com\/blog\/?p=3174\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3037,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,402,508,275],"tags":[503,579,582,584,580,583,581],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3174"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3174"}],"version-history":[{"count":1,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3174\/revisions"}],"predecessor-version":[{"id":3182,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3174\/revisions\/3182"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3037"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}