Posts

Showing posts from December, 2018

Dynamics Portal - Hide 'Sign in with External Account' and 'AzureAD' button

Image
Disable external accounts login for Dynamics 365 Portal I came across a requirement in a project where we need to restrict portal users using AzureAD or External accounts to create login accounts. After some digging, I figured out the steps to be performed to disable external accounts and AzureAD. Now, let’s look at steps External Account         Navigate to Portals -> Website -> Site Settings.          Search/find record Authentication/Registration/ExternalLoginEnabled  and then open the record.          Update value to ‘false’ and save the record. AzureAD         Navigate to Portals -> Website -> Site Settings.          Search/find record Authentication/Registration/AzureADLoginEnabled  and then open the record.          Update value to ‘false’ and save the record. Once ...

Microsoft Portal JavaScript

We have been working on Microsoft Dynamics Portals for sometime now and we come across scenarios where we need to show/hide fields, make fields required and so on..  Today we will see how we can use Javascript to perform these basic functions. Place all your code in Jquery Document ready function $(document).ready(function () { //your functions }); Disable lookup field if ($("#" + fieldName + "_name").hasClass("lookup")) { disableLookup(fieldName, fieldName + "_entityname"); } function disableLookup(LookupNameID, LookupEntityNameID) { var L_EN_ID = '#' + LookupEntityNameID; var L_N_ID = '#' + LookupNameID; var buttonContainer = $(L_EN_ID).next()[0]; if (buttonContainer != null && buttonContainer.children != null) { for (var i = 0; i < buttonContainer.children.length; i++) { var tagName = buttonContainer.children[i].tagName.toLowerCase(); if (tagName == "button") ...