Requirement: Sometime back we published a post for overriding out of the box command button behavior which works fine for the web client but one of our blog reader reported through twitter (Power of Social media ) that this customization is not working with UCI, so I thought of re-writing the same for the UCI. Details: Let’s see how we… Read more »
Source: Mahendra Pal

Introduction This article is about downloading Notes attachment from Dyanmics 365. If you have large number of records from where you want to download attachment, you can face different issues like timeout, slow downloading etc. Here I am going to provide sample code which you can use to download attachments from small set of data. Details To download attachment from… Read more »
Source: Mahendra Pal

Happy to share news that my 3rd book is published now. This book will help you learn about Dynamics 365 Customer engagement implementation options as well as you will learn about how to customize and extend Dynamics 365 CE. This book is divided into following 12 chapters: Introduction to Dynamics 365 CE This chapter will help you to understand basic… Read more »
Source: Mahendra Pal

Introduction If you are working with Partner Portal, you may notice that you are not able to see records in Portal even though you have all the required permission setup correctly. We are going to discuss another quick check that you can do while not getting data. Solution Most common reason when you are not able to see the data… Read more »
Source: Mahendra Pal

Introduction Recently we got one request to filter lookup based on the account as well as parent account of the account. This blog post is about how we implemented this requirement. Solution If we want to filter lookup based on the other lookup we can simply edit target field properties and can set Related Record Filtering option. We can select… Read more »
Source: Mahendra Pal

Introduction Recently one of our customer started using Unified Interface Client and they reported that they are not able to see all the accounts view under Field Service App. This post is about how to fix this issue. Solution By default Unified interface only show some entity view for example if you will check in online trial under web client… Read more »
Source: Mahendra Pal

Introduction
Recently while working on Field Service project, we got requirement to setup SharePoint integration where customer wanted to use Folder stricture based on the Account entity. By default entity based folder structure is not supported for work order entity so we used Flow to implement this requirement, in this article we are going to discuss the same.Requirement
Implement account entity folder structure for work order entity so that all the work order related documents is stored under parent customer folder hierarchy.Solution
When I got this requirement, I thought it can be achieved using out of the box configuration but when I completed SharePoint integration setup and tested, I found , Dynamics 365 CE was not creating folder for work order entity under parent service account, instead it was creating work order folder under standalone work order document library. When I tried to upload document in child opportunity, it was creating opportunity folder correctly under parent account in SharePoint. When I was troubleshooting this issue, I found this KB Which explains why work order document is not create under account hierarchy because Work order entity have multiple N:1 relationship record with Account entity.

“With the exception of the opportunity and contract entities, a hierarchical folder structure will not be automatically created in SharePoint for entities that have more than one many-to-one (N:1) relationship with the parent entity.”

After identifying the issue, next step is to fix it with minimal efforts and Microsoft Flow came into my mind as I have used it earlier for SharePoint integration. let’s see how we can create Work Order structure under Account.

The whole Flow to create work order folder is divided into two parts, the first part is below where we added three steps:
1. First steps is to start flow when new work order record is created so we selected Create step from Dynamics 365 connector.
2. Second steps is to Get Record step to get service account record because we need customer name to for SharePoint folder path.
3. There is no direct option to create folder in SharePoint but we can use Create File option from SharePoint connector where we can upload dummy file, and it will setup folder for us

We have created SharePoint folder for work order under account it now, but Dynamics 365 CE SharePoint won’t use this folder unless we will setup Document Location record and that’s the tricky part. To create document library record, let’s first understand, how document location record is created in Dynamics 365 in case folder structure hierarchy. Here is the screenshot of the document location records, when we have uploaded document under opportunity created HIMBAP customer.
As you can see in above screenshot, 1 record is created for the Account folder in the SharePoint site location. After that we have record 2 created for HIMBAP account under the Account location. Further Opportunity record is created under the Account folder because we have implemented folder hierarchy structure. After that Demo opportunity record is created which referred Opportunity document location record, so these records are related using following sequence.

And we need to implement the same sequence for our work order entity. We will discuss document location part in the next article, so stay tuned !!