Posts

Showing posts from 2022

How to open a lookup record within the same parent page in Dynamics 365 CRM using sidePane feature.

Recently I was looking for updates introduced in Dynamics 365 and came to know about sidePanes (I know, I am quite late :\), so I thought to open the lookup record within same parent page record i.e. If I click on "Parent Account" lookup field on a contact form then view the account record on the same contact page without navigating to any other page or tab or window. So, we can achieve this by following below line of codes in our JavaScript: function ExpandSidePane(executionContext) {     var formContext = executionContext.getFormContext();     var title = formContext.getAttribute("name").getValue();                                      formContext.getControl("parentaccountid").addOnLookupTagClick(function (e) {         e.getEventArgs().preventDefault();         var lookupRecord = e.getEventArgs().getTagValue().id;   ...

Get count of unique records in Power Automate (Dynamics Customer Engagement)

Image
Recently, I got a requirement in which I had to get the distinct count of records(from a custom table) associated with Appointment. To achieve this I wanted to go with the flow but since I recently have started working on Flow/ Power Automate, I had very little idea how to achieve this and hence I am adding the steps here which you can also follow to get this. Step 1: Choose the trigger point Step 2: Get the list of records for which you want count of distinct value Step 3: Initialize a variable of type array  Step 4: Add action 'Apply to each', here I am adding all Guids in array which we declared in last step Step 5: Add a 'Compose' data operation, here we will add only unique Guids from the above list collected: union(variables('AccountsArray'),variables('AccountsArray')) Step 6: In the final step we just need to count the records of unique Guids stored in the last step. length(outputs('Compose'))   Combined screenshot fyr:
go to top image