How to – Use Refresh Option to force user state synchronization in Power Platform Admin Center – Dynamics 365 / CRM


At times we would assign or update the licenses and roles assigned to the users in Microsoft 365 Admin Center, and these changes would take time to reflect inside the Dynamics 365 applications.

A background system process takes care of synchronizing the user state in Azure AD to the System User table in Dataverse.

However, here we can also use the Refresh
User option in Power Platform Admin Center to force the synchronization instead of waiting.

Inside Power Platform Admin Center – Navigate to Environment >> [Env]>> Settings >> Users and select the user and click on Refresh user option.

This will immediately start the synchronization process.

Hope it helps..

Advertisements

How to – Stop Synchronization of Task / Appointment through System View using Sync Filter Manager


In the previous post, we saw how we can create a user filter (outlook) for a particular user and apply the same to other users through Sync Filter ManagerXrmToolBox plugin.

https://nishantrana.me/2022/03/29/how-to-stop-synchronization-of-task-appointment-between-dynamics-365-and-outlook/

In this post, we’d achieve the same through System View.

Here we have created below System View on Tasks entity/table.

The Created On Doesn’t Contain Data False Condition will make sure none of the records of the task are synced.

Open the Sync Filter Manager, navigate to the System Views tab and click on Load System Views

Select the new System View- Task Filter which we created earlier and click on Create – System Synchronization Filter Template from selected view(s)

Select Outlook Template for System Rule Type

We are presented with the option to specify the user(s) to who we want to apply the new template.

If we select Yes, we get the Select users dialog box to select the user(s).

Inside the Synchronization Filters Templates tab, we can click on Load Synchronization Filter Templates to list down all the outlook templates.

We can see our custom template listed there.

From there again we apply it to the user(s) or define it as the default filter.

After applying Define as default, we can see the custom filter applied to the new users. It won’t be applied or make changes to the filters of the existing users.

So for the existing users, we have to explicitly apply this filter using Apply to users option

As the last step, we need to disable or delete any other filter on the task, to make sure that we only have the new filter applied.

On disabling the filter, we can see their status updated as inactive.

Lastly, we can only delete Custom Outlook Template, if we try deleting any default out of the box template we will get the below error.

E.g. on trying to delete the My Tasks default filter, we will get the below error

“Error while deleting selected records: SavedQuery My Tasks for otc 4212 cannot be deleted”

Check other posts on Synchronization –

Hope this helps..

Advertisements

Business Process Flow UI Improvement in Dynamics 365 / CRM


With 2022 Release Wave 1, we have a small enhancement in the user interface inside the BPF path line’s color contrast.

With 2022 Release Wave 1 turned off

With 2022 Release Wave 1 – the path that needs to be followed is shown now in a slightly darker shade,

making it easy for an agent to understand the stages to be followed in the business process flow.

Hope it helps..

Advertisements

How to – Upload File to File Column using InitializeFileBlocksUpload and UploadBlock Request (Dynamics 365/ CRM)


Sharing a sample code, we can use to upload a file to the File Column

Also read –

https://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

File Attribute

https://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

Here we would upload the below file to one of the contact records.

For file size more than 4 MB we need to implement chunking and combine the data before committing.

uploadimg

On calling the method –

We can see the file uploaded to the contact record.

The restriction of using chunked upload for files greater than 16 MB has been removed, see the below code for full file upload. The chunking APIs are still kept for backward compatibility.

Example – .NET C# code for full file upload. (recommended way of uploading)

Hope it helps..

  private static void UploadFile(CrmServiceClient svc, string entityName, Guid recordGuid,
           string fileAttributeName, string filePath, string fileName)
        {
            // get the file content in byte array
            var fileContentByteArray = File.ReadAllBytes(filePath);

            var initializeFileBlocksUploadRequest = new InitializeFileBlocksUploadRequest()
            {
                Target = new EntityReference(entityName, recordGuid),
                FileAttributeName = fileAttributeName,
                FileName = fileName
            };

            var initializeFileBlocksUploadResponse = (InitializeFileBlocksUploadResponse)
                svc.Execute(initializeFileBlocksUploadRequest);

            // to store different block id in case of chunking           
            var lstBlock = new List<string>();         

            // 4194304 = 4 MB
            for (int i = 0; i < fileContentByteArray.Length / 4194304  ; i++)
            {
                var blockId = Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString()));
                lstBlock.Add(blockId);
                
                var uploadBlockRequest = new UploadBlockRequest()
                {
                    BlockId = blockId,
                    BlockData = fileContentByteArray.Skip(i * 4194304).Take(4194304).ToArray(),
                    FileContinuationToken = initializeFileBlocksUploadResponse.FileContinuationToken
                };

                var uploadBlockResponse = (UploadBlockResponse)svc.Execute(uploadBlockRequest);
            }

            var commitFileBlocksUploadRequest = new CommitFileBlocksUploadRequest
            {
                FileContinuationToken = initializeFileBlocksUploadResponse.FileContinuationToken,
                FileName = fileName,
                MimeType = System.Web.MimeMapping.GetMimeMapping(fileName),
                BlockList = lstBlock.ToArray()

            };

            var commitFileBlocksUploadResponse = (CommitFileBlocksUploadResponse)svc.Execute(commitFileBlocksUploadRequest);
        }
Advertisements

Fixed – User Presence not working – Customer Service Workspace / Omnichannel (Dynamics 365/CRM)


Recently while exploring Customer Service Workspace we could not see the presence being loaded for the users.

The first thing we need to check here is if the user has either the Omnichannel Agent / Supervisor role or Customer Service Representative role assigned. (it will not load even if you are a system admin or Omnichannel Administrator role only)

The next thing to check is the omnichannel record (Channel Integration Framework V2.0 Providers entity/table)

Check the value for the Channel URL field –

It should be

https://oc-cdn-ocprod.azureedge.net/convcontrol/ChatControl.htm?uci=true&clientName=zfp&cloudType=Public&env=prod&amp;ocBaseUrl=https://unq0c996fcff27241fb845216a48ece6-crm.omnichannelengagementhub.com&ucilib=https://org749544d7.crm.dynamics.com/webresources/Widget/msdyn_ciLibrary.js

Replace the first part in ocBaseUrl with your organization’s Unique Name (Customization > Developer Resources)

and second is the organization base url in the uclib.

If it still doesn’t work or gets stuck at 25 or 57 percent, check if you have security defaults enabled in the tenant if so either disable it.

Disable Security Defaults while login into Power Platform / Dynamics 365 – Nishant Rana’s Weblog

Or make sure the users have the multi-factor authentication set up on their account.

After we made sure all the above settings – we had the presence working for the users.

Get all the details here-

Troubleshoot issues in Omnichannel for Customer Service

Hope it helps..

Advertisements

Solved – Disabled Turn on unified routing option in Dynamics 365 Customer Service Hub


Recently while trying to provision Unified Routing from Dynamics 365 Customer Service Hub in one of our trial environments (Service Management >> Service Configuration >> Unified Routing – Turn on unified routing.),

even after providing the consent multiple times (by clicking on Provide consent, with Global Admin role)

it kept coming as disabled and kept asking for providing the consent.

Opening in in-private browsing or a different browser didn’t fix it.

Clearing the cache also didn’t help – Empty Cache and Hard Reload
https://nishantrana.me/2018/02/28/empty-or-disable-cache-while-working-with-web-resources-in-dynamics-365-chrome/

The trick that worked here was creating a workstream record

which also triggered the provision of Unified Routing 

And after our workstream record got created,

we could see the unified routing enabled successfully.

Hope it helps..

Advertisements
%d bloggers like this: