Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 2

Restricted View Permission is not Visible in SharePoint Permissions

Posted On February 1, 2023 by Vidit Gholam Posted in Tagged in

I created a SharePoint site and was working on user permissions for a document library, I wanted to assign the Restricted View permission to a group but the permission was not visible. Below is the screenshot of the document library I created in my SharePoint and as you can see the Restricted View Permission is not available in the permission list. So how to make the permission available, the catch here is that it is only visible if there is a document uploaded in the document library (So you can upload a dummy document to your library and later delete it).  Hope this helps!

Share Story :

Remove Hover from Primary Navigation Bar Power App Portal

I had a requirement from a client to remove the hover from the header navigation on the customer portal. Here is how we do it, if we inspect, we can see that this is handled by a style element “.navbar-inverse .navbar-nav > li > a:hover“ Now if we removed the background colour here is how it looks. Now let’s make these changes in the code, edit your portal and open the portal in the Power Apps gallery and go to themes. Search for the style element and comment or remove the background colour. Hope this helps!

Share Story :

Button missing from ribbon Dynamics CRM (Field Service Work Orders)

Recently I faced issues with some of our custom and Out of the Box ribbon buttons disappearing for example look at the snapshot below. For any selected service order I was not able to see the Run Flow button which runs on-demand workflows and Power Automate Flow (and a few custom ribbon buttons as well). I investigated and found out that this happens because of a field service setting called “Show Simplified Work Order Command”. As per the document – https://learn.microsoft.com/en-us/dynamics365/field-service/configure-default-settings This setting influences the command bar on work order records and lists. By default, this field is set to Yes, which shows only the most relevant commands for work orders. The following commands will be hidden from the form: deactivate, check access, process, add to queue, queue item details, assign, share, email a link, flow, Word templates. The following commands will be hidden from the list view when no records are selected: email a link, flow, import from Excel. The following commands will be hidden from the list view when a record is selected: activate, deactivate, email a link, add to queue, flow, Word templates, Excel templates. When set to No, all commands are shown. To turn it off in your field service app go to settings from the change area and select Field Service Settings, under field service setting turn off Show Simplified Work Order Commands to No. Now we can see our run flow button along with a couple of other buttons. I hope this helps!

Share Story :

Custom Field Validation for Website Fields in Dynamics CRM

Posted On December 14, 2022 by Vidit Gholam Posted in Tagged in

Dynamics 365 provides functionality to create a text field of type website field where the user can type in the website name. But out of the box, it has no validation to validate if the user is actually putting a web URL or just a text value, this can be achieved using simple JavaScript.  In this blog, let’s see how to put a validation on a website field in CRM so that users enter the correct data.  I have created a website field in CRM and here is how it looks.  Using the below javascript code you can put a validation on this website field. Code:       validateWebsiteURL: function (formContext, fieldName) {          if (formContext.getAttribute(fieldName)) {              var websiteurl = formContext.getAttribute(fieldName).getValue();              if (websiteurl != “”) {                  var pattern = new RegExp(‘^(https?:\\/\\/)?’ + // protocol                      ‘((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|’ + // domain name                      ‘((\\d{1,3}\\.){3}\\d{1,3}))’ + // OR ip (v4) address                      ‘(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*’ + // port and path                      ‘(\\?[;&a-z\\d%_.~+=-]*)?’ + // query string                      ‘(\\#[-a-z\\d_]*)?$’, ‘i’); // fragment locator                  if (!pattern.test(websiteurl)) {                      formContext.getControl(fieldName).setNotification(‘Website: Enter a valid Website URL.’);                  } else {                      formContext.getControl(fieldName).clearNotification();                  }              }          }      }  I hope this helps 😉! 

Share Story :

Hide Profile Section from Power Apps Portal Header Navigation Bar

The Power Apps Portals Primary Navigation Header always has a section to the profile page as shown in the snapshot below.   It is possible to disable this by adding a Web Page Access Control Rule, this will restrict read access to the profile page, but what if you don’t want to remove the read access and you only want to remove the Profile Section from the header, here is how to do it.  The Primary Navigation or Navigation on the portal is a part of the portal’s Header Component, this header component comes from the Header Web Template, It is not possible to edit this template from the Power Apps Portal Studio. To be able to edit this template we will have to use the portal management app  Step 1: Go to Portal Management App, under templates search for Header Template.  Step 2: at line number 104 or after line number 95 search for Class “dropdown-menu” in an unordered list (ul) and comment the below code.  Ding!! We have done it.  Hope this helps 😉!

Share Story :

Map Newly Registered Portal Contacts to Existing CRM Contacts in Power Apps portal (Azure AD)

Power Apps Portal allows us multiple ways to authenticate users, users can login either by using a User ID and Password for local login or using SSO logins like Azure AD, etc.  Users can also register themself through the portal, when a user registers from the portal this creates a new contact with the user’s details and email ID in CRM.  But what if the contact already exists in your system? To map the registered portal user with this existing contact instead of creating a new contact we need to enable/add a site setting.  Site Setting –  Authentication/[Protocol]/[Provider]/AllowContactMappingWithEmail  More on Protocol & Provider – https://learn.microsoft.com/en-us/power-apps/maker/portals/configure/configure-portal-authentication  For Azure AD login which is provided by default, you can use the Site Setting – Authentication/OpenIdConnect/AzureAD/AllowContactMappingWithEmail  Reference Microsoft Document – https://learn.microsoft.com/en-us/power-apps/maker/portals/configure/configure-site-settings#portal-site-settings  I hope this helps 😉 ! 

Share Story :

Filtering Entity Lookups based on field value

Posted On March 10, 2022 by Vidit Gholam Posted in Tagged in

I have a contact record with a role option set field with options Billing, Decision Maker, Client, Influencer.  The Requirement is to only show billing contacts i.e. contacts with role billing related to the account selected on the Opportunity in the lookup of the contacts on the Opportunities.  Let’s see how I to filtered the contacts lookup to just show billing contacts :   Step 1:  Create a contacts view such that the role is billing(or any field on which you want to filter is set to the value by which you want to filter that record ).  Step 2:  Set the filter criteria of the contacts lookup field on the opportunity as shown below.  In the Additional properties  turn of the view selector and set the default view to the view you created in #1Step 1  In the Field Behavior Tick the “disable most recently used items for this field”.  Now you will only see contacts with role billing in the lookup of the contacts on the opportunity form.  Hope this helps!   Thank you. 

Share Story :

Dynamically storing MS Forms Drop down field values into D365 CRM Option Set using Power Automate Flow

MS Forms offers a functionality to create a dropdown field which is similar to an option set fields in D365 CRM, But when it comes to mapping or storing values between these two field things become a bit tricky. However there are a few workaround using power automate capabilities. In this blog let’s see how we can store a MS Forms Dropdowns options into an Option Set field in CRM.  What is an Option Set? Option sets are a field type that can be created within Dynamics CRM and are Often referred to as “dropdown” or a “pick-list”.   An option set has two identities for each of its option. The Options Label Name and the Label Value as shown in the below snapshot.  What is a Dropdown in MS Form ? A dropdown is a list of defined options(Choice) that can be selected by a user, unlike a text field where the data can be “organic” or manually entered.  Now Let’s Consider an use case :  Consider we have a MS Form Name “Company Registrations” when a user submits this form a Power Automate flow is triggered which creates a new Account record in CRM with the field mapping shown in similar colors in the below snapshot.   Now we need to get the form responses first to create a new Account record.  2. All the Text field values can be directly mapped into the dataverse connector as shown in the below snapshot.  3. For mapping the MS forms Dropdown to the Option set we need to maintain the CRMs Option Label values into our flow as to set (define the value of the option set) Option Sets in CRM we need to pass the Label Values to the flow (if you just pass the label text it won’t work hence we need to maintain these option set values in the flow)as shown below.  4. Now we need to select the option set field in our flow connector and select enter custom value.  5. Once you are able to add a customer value use the following expression which will dynamically bring option set label value for the dropdown choice selected by the user on the form.Expression – outputs(‘Option_Set_Values’)?[outputs(‘Get_Form_Response’)?[‘body/rf98dd4fb83624fc7b7314de77542a3ef’]]Red : Text in the above expression corresponds to “Outputs “in the below snapshot which is the output of the compose in which we stored our option set label values. Blue : Text corresponds to the “Ownership Type” from the form response.   Output : MS Form Submission –   Created Account Output –   Hope this helps !  

Share Story :

Get Time in Hours and Minutes from a Date Field in CRM using JavaScript.

D365 gives a functionality to create a Date and Time field where in you can provide the user to select the date or both date and time. But what if you just need the time in Hour and Minutes format from the selected date in the Date field, This can be achieved using a JavaScript. In this blog lets see how we can get the time entered in the date and time field and format it in hours and minutes format. I have created a field in CRM with field type Date and time. Here is how it looks Using the JavaScript “Date” functions you can get the Time entered in the date and time field as shown below. This code gets the date and time (hours and minutes) selected in the date field and will format the hour and minutes in the format “HH:MM“. Hour – (getHour()) Minutes – (getMinutes()) Output – Note : You can also add the AM / PM to the time string I have not added it in my time string “strTime” but have stored the value of it in “ampm“. Hope this helps !

Share Story :

Get Month | Day | Year from a Date field in CRM using JavaScript.

D365 gives a functionality to create a Date and Time field where in you can provide the user to select the date or both date and time. But what if you need just the month from the selected date in the date field or say the date or year from the selected date in the date field, This can be achieved using a JavaScript. In this blog lets see how we can split or get the Month | Day | Year from a selected date in the CRM Date and time type field. I have created a field in CRM with field type Date and time. Here is how it looks Using the JavaScript “Date” functions you can get the Month | Day | Year and Time of the entered date as shown in the below script. This code gets the date selected in the date field and splits the date into Month – (getMonth()) Note : January – December is (0-11) hence add 1 so make it (1-12). Day – (getDate()) Year – (getFullYear()) This code gives the month date and date in 2 digit format i.e. if the date is a single digit say 9 it will give it as 09. You can further use this according to your requirement either to change the date format or for many other date related customizations. Hope this helps !

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange