Category Archives: D365 General
Dynamics CRM- Rollup with Custom Hierarchies
CRM Custom hierarchies are very useful feature for maintaining hierarchy among records and also provide nice visualization of the Hierarchies. With rollup fields and custom hierarchies have become even more useful to derive and visualize meaningful data in the hierarchy. In this blog, we will use how to leverage Rollup fields and Custom hierarchies to get proper data and avoid redundancy and custom calculations. Problem statement: Suppose you have a custom hierarchy of campaign, so a campaign can have multiple child campaigns. Each campaign has leads associated to it. The requirement is to get the count of all the leads of the related child campaigns and also itself. Solution: If you want count of leads on the campaign, we can easily create a rollup field on Campaign to get the count of leads on Campaign. The rollup field will look like below: You can see the count of leads using the above rollup below on the campaign form: Get total lead count of child campaigns on Parent Campaign Without hierarchy to achieve this, we would need to write a custom plugin or JavaScript to get the lead count of all the child campaigns and set it on the parent campaign. With rollup using hierarchy, we can get this done without any calculations. See below the rollup definition for this. Note that we have now enabled “Use Hierarchy” in the rollup definition. This will get us the count of all leads including Child campaign as well. See the form now with the updated rollup definition, the lead count is now “8” which is the sum of lead count of all child campaigns. Conclusion: Leveraging Calculated fields, rollup fields and custom hierarchies we can easily build good and simple solutions, avoid custom calculations and redundant fields.
Share Story :
How to remove business process flows from existing records?
Problem Statement Many times we come to a scenario where clients ask to remove business process flows from the production environments. In such scenarios, there are chances that on the existing records, the business process flows are already set on the records. Hence even if we deactivate the business processes, we still see a yellow ribbon as per below screenshot: So, how to fix this issue? Solution First of all, we should not directly delete the business processes as clients might ask to reactivate the same and we don’t want to rework on the complex logic we have already implemented. So, to remove above issue while keeping backup of the business process, we will have to follow below steps: Go to Setting > Processes Select the business process flow and deactivate it. Open Business process flow and click on the Save As option from the top ribbon. Delete the old business process flow. After following above steps, you should be able to see that, business process section from existing records is removed and no warnings are shown at the same time, we have backup of the process which we can reactivate in future if needed.
Share Story :
How to insert hyperlink with friendly URL in Email Templates in CRM
Problem Statement Many times we came across the scenario to have links in email templates and make the email template better in presentation aspect with the help of HTML. This blog explains how can you add hyperlink with friendly URL in Email templates. Business Scenario ‘Adventure Works’ company wants to send email notification to case owner on create of case with below email format. Click here should navigate user to URL stored in Custom URL field of Case entity. We will achieve this requirement with the help of email template. Note: We have not covered creation of workflows in this blog. We will use workflow on create of case record to send email using below email template. Steps to create email template Go to Settings > Templates > Email Templates Click New. Select Template Type as Case. Create template body as per below: Below will be the output:
Share Story :
Select your error notification preferences
We have observed that many times when we access CRM environment, somehow we get to see below error notifications. Most of the times these errors are not related to our custom development. So, when we are in meeting, or showing product demo to client, and if such errors occur on the screen, clients will not like it and hence we should always take care of these unwanted and uncontrollable errors. As, these are not our errors, the only thing we can do is that, we can disable these notifications to come up on the screen. Below are the 2 ways in which you can disable these notifications: Method 1: Ask individual user to set the preferences. Go to Personal settings from Top Right Setting icon. Go to Privacy tab and select option ‘Never send an error report to Microsoft about Microsoft Dynamics CRM’. Click OK. Method 2: You (CRM Administrator) set preferences on behalf of your users. Go to Settings > Administration. Select Privacy Preferences option. Select setting as below:
Share Story :
Create surveys in Dynamics CRM 2016
Introduction After installing the Voice of Customer solution you can create the surveys based on your requirement. We had a requirement to create a survey for employees. Employees will fill the surveys and provide a feedback about the job satisfaction, relations with Managers, attitude towards the work environment depending on the questions specified in the surveys. This feedback will be stored in the CRM and will be used by HR to measure the Happiness of the Employees. According to these requirements we will create a survey. Steps to create surveys in CRM From the menu, go to Voice of the Customer -> Surveys Click New. By default, there will be a survey created in the draft state. Within the survey record some of the configuration options include Survey close date– after which responses won’t be captured Restrict multiple replies– limit respondents to 1 survey post only Anonymous responses– responses aren’t linked to CRM contacts, leads or cases Use Captcha– set controls to authenticate responses Unsubscribe– include an opt-out option on survey forms On the same form, survey runtime controls include: Theme – select which survey theme record will be applied Progress bar & page numbers– for surveys consisting of several pages Footer links– including email address, privacy policy Navigation text– change the default next / previous options The invitations and actions section in the Survey Record form includes: Email snippet– a unique survey string that will pasted into a CRM email template to direct people to the survey. This will be automatically generated by the system when a new survey is saved. Invitation link– rather than having the long snippet (above) exposed in the email invitation a call to action text can be applied instead e.g. Take our Survey Anonymous survey– if this option has been set the generic URL will be shown here for invitations Send email response– set an email template as an auto-responder when replies are posted The feedback section in the Survey form categorize the survey as Feedback survey. Generate Feedback– By default the value is OFF. If the value is OFF it means that the survey is of type response. You can set it as Automatically when survey published or Manually. Feedback Customizations – you can set the feedback entity name, solution in which you want to add this entity, schema name of the entity. The Feedback surveys creates a new entity as specified in the Feedback Customizations. You need to specify the Solution name in which you want to add this newly created entity. The responses will be tracked in this newly generated entity and can be used for analysing purpose. For every feedback survey, new entity will be generated. You need to specify the schema name of the entity. Steps to design surveys in CRM The process to define survey questions is not immediately obvious from the user interface but this can be found by toggling the designer form from the top of the survey record. By default, three type of pages will be created. Welcome page Question page Complete page You can add pages in between and define the page type. Each page has a section where we can define the category of content mentioned on the page. Question page: Individual question form records will be dragged into the section form from the right panel. In the below example, after the welcome page an introduction of the survey is mentioned. This will be mentioned as descriptive text box but this will still be defined as a Question. The next page consists of questions for employees. Here is just a few type of questions that can be dragged in to a section from the panel on the right. Short or long answers– text boxes of varying sizes Ratings– recipients give a star rating from 1 to 5 (or more) which can include half scores. Another option includes ratings by three colour coded flags Date fields – date type answer Ranking– we can ask the employee to rank the skills Net Promoter Score– a metric to define how likely an individual will recommend Customer effort Score– 5 point slider to rate how easy a client found it to deal with you A standard CSAT satisfaction metric– a standard customer satisfaction field. Smile’s rating– ask how respondents feel and capture their response in smiley that matches their mood. Publishers can choose from 9 different faces though in this release it doesn’t appear possible to upload a define new smiley icons beyond the default ones. Lists of Ratings– ask recipients to rate several items in one block. The example below has a list to ask what factors are important in choosing a new car Multiple ratings – similar to the above but using a grid of radio buttons to collect feedback per line Upload a file– enabling respondents to upload and share supporting files. Single response radio buttons– single response can be captured Multiple response tick boxes– multiple response can be captured Simple text edits to questions can be made from the designer screen, otherwise click these items to open the question record to make the changes. Rules can be set to make questions mandatory, or to show on-screen help in the event that clarification might be needed. Survey publishers can also personalize survey forms by piping data in from CRM fields, for example a customer name, CRM user, product or location. Now after adding questions you need to save and publish the survey so that you can use further. To save your work, click the Save button in the bottom right corner of the screen. When you’re done editing your survey, click Publish. After it’s published, you can do the following: To step through your survey, click Test. To preview your survey, click Preview. To create a copy of your survey, click Clone. To export translations, click Export translations. You can then access the resulting Translations.xml file from the Summary area of your survey. To copy snippets to use elsewhere in this survey or others, select the snippet (survey part or text) you want to copy, and then click Copy snippet. … Continue reading Create surveys in Dynamics CRM 2016
Share Story :
Business Process Flows in CRM
Business Process Flows are role based process flows that guides user to navigate between entities as per the requirements. i.e. they guide users to have a step by step process divided in different stages and each stage contains different set of fields where user can enter data. Business Process Flow can also be enhanced with branching using “If-Else Logic” and “Logical Expressions” (AND or OR) Operators. Also Branching Rule can only contain AND or OR Operator but not both operators together. NOTE: Each Business Process Flow can contain no more than 30 stages. In Multi Entity Process, max 5 entities can be selected. Below is the example which we tried implementing for a Pharmaceutical Manufacturing Company to enhance their productivity with streamlined user experience. Here we created the Business Process Flow which guides user to create Inquiries, Sample Request Form, Document Request and Invoices based on different branching logic. Pre-Requisites In the backend, for custom entities, Business Process needs to be enabled on Entity Level. To enable Business Process Flow for certain users, it can be done as shown in below image. Example: Marketing Team creates Inquiry (Opportunity) with required details and once it is created, Marketing Team proceeds to create Quotations for Products for the Inquiry was raised by clicking on Next Stage. Once Quotations are created, based on branching logic of whether Samples or Documents is needed, the stage alters. So If Quote Accepted = Yes and Sample Required= Yes, the next stage is Sampling Stage. Or if Quote Accepted= Yes and Sample Request = Yes and Document Request = Yes, the next stages are Sampling and Regulatory Stage. Or if Quote Accepted = Yes and Document Request = Yes, then there is no Sampling Stage as the next stage. So as seen above, we can see how based on different criteria and conditions the stages changes. These conditions can be defined as per the user’s Business Logic. Conclusion: Thus by using Business Process Flow we can guide user to navigate between different entities and complete the streamlined process and improve the productivity of the company.
Share Story :
How to Read/Write data from Azure service bus Topics/MSMQ
We had a requirement where one of our client wanted to perform the below operation. Data will read from the Azure service bus and will be written to windows MSMQ. Similarly, Data will read from windows MSMQ and will be written to Azure service bus. Introduction Client had a third party solution which used to send the data from portal to Dynamics AX, they did not have direct way to send the data to AX, so they did some custom development and used a worker role to send the data to AX. Similarly, they were sending back data to the custom portal. So, they wanted to use the scribe Insight to integrate the two system instead of the worker Role deployed by tem. Description As we know that the data is present in Azure Service Bus Topic from the third Party Application. We can implement the logic and send the data to the Scribe in Queue. Azure Service Bus (Topic) -> Microsoft MSMQ If you want to send the data form Azure service bus Topic, please follow the steps. Read the data from the Azure service bus and write to the Microsoft MSMQ (Scribe Insight Queue) You need to have connection string of the service bus. Topic Name. Subscription Name. MSMQ name. You can use the below code to read the data from Azure service bus Topic private void ReadTopic() { string connectionString = “Endpoint=sb://sample.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=d7wsaddYK1unQjy1WiIdX/4t8M+vtFZPKDluMSzelFpGdadsad=”; SubscriptionClient Client = SubscriptionClient.CreateFromConnectionString(connectionString, “topic”, “subscription”); // Configure the callback options. OnMessageOptions options = new OnMessageOptions(); options.AutoComplete = false; options.AutoRenewTimeout = TimeSpan.FromMinutes(1); Client.OnMessage((message) => { try { // Process message from subscription. eventLog.WriteEntry(“Processing data”); var bodyJsona = new StreamReader(message.GetBody<Stream>(), Encoding.UTF8).ReadToEnd(); bodyJson = @bodyJsona; var document = JsonConvert.DeserializeXmlNode(bodyJson, Constants.ROOT); eventLog.WriteEntry(Constants.MESSAGEID + message.MessageId); MessageQueue rmTxnQ = new MessageQueue(FormatName:Direct=OS:” + MachineName + “\\private$\\scribein ); rmTxnQ.DefaultPropertiesToSend.Recoverable = true; rmTxnQ.Send(document, MessageQueueTransactionType.Automatic); message.Complete(); } catch (Exception) { // Indicates a problem, unlock message in subscription. message.Abandon(); } }, options); } The Above function will keep listening and if there is any data coming to specified topic/subscription it will read the data and write to the specified queue. Once that data is in MSMQ you can read and pass the data to AX system since the connector is available in Scribe Insight. Microsoft MSMQ -> Azure Service Bus (Topic) Read the data from the Microsoft MSMQ (AzureOut Queue) and write to the Azure service bus. You need to have connection string of the service bus. You can use the below code to read the data from MSMQ. Since there is no listener, so if there is any data coming to the MSMQ (AzureOut) it will not process immediately if any record processed to the queue. You can use the below function to read data form the MSMQ You need to have connection string of the service bus. Topic Name Subscription Name MSMQ name private void ReceiveMessageFromQueue( ) { MessageQueue messageQueue = null; Message[] messages = null; XmlDocument doc = null; ////XDocument input = null; string dataFormatedJson = string.Empty; string messageTopicName = string.Empty; string connectionString = “Endpoint=sb://sample.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=d7wsaddYK1unQjy1WiIdX/4t8M+vtFZPKDluMSzelFpGdadsad=”; string topicName = “topic”; try { messageQueue = new MessageQueue(“FormatName:Direct=OS:” + MachineName + “\\private$\\azureout”, false); messages = messageQueue.GetAllMessages(); foreach (Message msmqMessage in messages) { Message message = messageQueue.Receive(); messageTopicName = message.Label; message.Formatter = new XmlMessageFormatter(new string[] { “System.String” }); byte[] b = new byte[message.BodyStream.Length]; message.BodyStream.Read(b, 0, (int)message.BodyStream.Length); System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); var returnVal = enc.GetString(b); doc = new XmlDocument(); doc.LoadXml(returnVal); ////input = XDocument.Parse(returnVal); dataFormatedJson = JsonConvert.SerializeXmlNode(doc); TopicClient client = null; try { client = TopicClient.CreateFromConnectionString(connectionString, topicName); client.Send(new BrokeredMessage(formattedData)); client.Close(); } catch (Exception ex) { this.eventLog.WriteEntry(“Message: ” + ex.Message + “Trace: ” + ex.StackTrace + “Data: ” + formattedData); } } } catch (MessageQueueException ex) { this.eventLog.WriteEntry(“Message: ” + ex.Message + “Trace: ” + ex.StackTrace + “Data: ” + dataFormatedJson); } catch (Exception ex) { this.eventLog.WriteEntry(“Message: ” + ex.Message + “Trace: ” + ex.StackTrace + “Data: ” + dataFormatedJson); } finally { messageQueue.Close(); } } Using above two function you can read and write the data from Azure service bus Topic to MSMSQ and similarly you write the data back to the Azure Service Bus Topic from MSMQ. Hope this help you to understand how to send and receive the data from Azure Service Bus Topic and vice versa.
Share Story :
Integrating Data to Multiple Dynamics AX7 Legal Entities using TIBCO Cloud Integration
Introduction: A single Microsoft Dynamics AX7 database can contain multiple individual company accounts. Each company account in an application uses the same application logic, but has its own set of data for tables. Data that is stored in one company account cannot be accessed from other companies. So, for Integrating data into these multiple individual company accounts, some procedures need to be followed. In this article, we will integrate Customers from Microsoft Dynamics CRM Online to multiple legal entities (companies) in Dynamics AX7, using the TIBCO Cloud Integration as an integration tool. Prerequisite: Microsoft Dynamics CRM Online. Dynamics AX7. TIBCO Cloud Integration Subscription. Purpose of the Setup: Our goal is to integrate Data from Microsoft Dynamics CRM Online to Multiple Companies which are setup in Dynamics AX7 through Batched Process. (It can be done in Real time as well). Steps: Configure a connection for your Microsoft Dynamics CRM Online by providing the required information. Configure a connection for your Dynamics AX7 by providing the required information. In the Company Name field of the connector: You can specify any legal entity name which is present in Dynamics AX7. Or You can specify your company name. We will consider two scenarios: Steps for creating records in multiple companies in Dynamics AX7:Scenario 1: We will create a Customer in CRM Online and integrate it to “DAT” Company of Dynamics AX7. Create a new Solution and specify the Solution name and the Agent. Note: Here, we are using a Cloud Agent. Now create an Advance Map for integrating Customers from CRM Online to Dynamics AX7. Source: Microsoft Dynamics CRM Online Target: Dynamics AX7 While mapping the fields, in dataAreaId field of Dynamics AX specify the legal entity name of AX7 for which the customers should be integrated. Note: In Dynamics AX7 table, the legal entity name for each record is stored in dataAreaId field. Test the Map by creating a Customer in CRM Online and then run the above Solution in TIBCO Cloud Integration. Now go into Dynamics AX7(DAT Company), you can see the customer has been integrated from CRM. Conclusion: If a dataAreaId field is specified, then records will be created in AX7 for that company (irrelevant to the company name specified in the TIBCO Cloud Integration AX Connector) If a dataAreaId field of AX is not specified, then the records will be created in AX for the company specified in the TIBCO Cloud Integration AX Connector. If company name in TIBCO Cloud Integration AX Connector is not present in Dynamics AX7, no records will be created and Scribe will give the following error: Steps for fetching records from multiple companies in Dynamics AX7:Scenario: We will create two Customers in Dynamics AX7 for two different companies (DAT and USMF) and integrate it to CRM Online. Create a new Advance Maps and specify Source and Target Connection. Source: Dynamics AX7. Target: Microsoft Dynamics CRM Online. In the Query block, mention filter criteria as: dataAreaId = “dat “ or dataAreaId =” usmf” Create Customers in Dynamics AX7; one customer in “DAT” company and another in “USMF”. Run the above Map from Scribe. Now go into CRM, you can see the customer has been integrated from Dynamics AX7. Conclusion: If a dataAreaId is not specified, records are fetched from AX7 of the company which is specified in the TIBCO Cloud Integration AX Connector. If a dataAreaId is specified, records are fetched from AX7 of the company which is specified in dataAreaId field. (irrelevant to the company name specified in the TIBCO Cloud Integration AX Connector or User Company Name)
Share Story :
Download SharePoint file programmatically without sharing it – Dynamics CRM and ADX portal or custom portal
This blog intends to able to download a SharePoint file without sharing it using Dynamics CRM and (optionally on-prem ADX portal since we can use below approach in custom portal as well). Many times we come across scenarios where we want to share SharePoint documents with end users on web portals without give them sharing access from SharePoint. Prerequisite CRM online SharePoint online Web portal code access (ADX on-prem or custom portal). Step 1: Enable SharePoint integration with CRM. Step 2: Custom code to access SharePoint document. Add the following code on the page where you want to show list of SharePoint documents to the end user. CS file code: DataTable dt = new DataTable(); var password = new SecureString(); foreach (var c in “yourpassword”.ToCharArray()) password.AppendChar(c); ClientContext cxt = new ClientContext(“https://yourdomain.sharepoint.com/Site1”); cxt.Credentials = new SharePointOnlineCredentials(“Username”, password); List list = cxt.Web.Lists.GetByTitle(“Document Sharing”); cxt.Load(list); cxt.Load(list.RootFolder); cxt.Load(list.RootFolder.Folders); cxt.Load(list.RootFolder.Files); cxt.ExecuteQuery(); FolderCollection fcol = list.RootFolder.Folders; List<string> lstFile = new List<string>(); DataRow dr; foreach (Folder f in fcol) { if (f.Name == relativeURL) //relative url of the file. { cxt.Load(f.Files); cxt.ExecuteQuery(); FileCollection fileCol = f.Files; foreach (File file in fileCol) { dr = dt.NewRow(); lstFile.Add(file.Name); dr[“fileName”] = file.Name.ToString(); dr[“createdOn”] = file.TimeCreated.ToShortDateString(); dr[“fileURL”] = @”javascript:downLoadFile(‘” + file.ServerRelativeUrl.ToString() + “‘)”; //Append Javascript function to the row. dt.Rows.Add(dr); } } } GridView2.DataSource = dt; //GridView2 being a grid added on your .aspx page. GridView2.DataBind(); GridView2.DataSource = dt; //GridView2 being a grid added on your .aspx page. GridView2.DataBind(); GridView2 in .aspx page: //Javascript function <script type=”text/javascript”> function downLoadFile(link) { window.open(“DownloadFile?url=” + link, “_blank”); } </script> //GridView Code <asp:GridView ID=”GridView2″ runat=”server” Visible=”true” AutoGenerateColumns=”False” BorderWidth=”1px” BackColor=”White” GridLines=”Vertical” CellPadding=”4″ BorderStyle=”None” BorderColor=”#DEDFDE” ForeColor=”Black”> <FooterStyle BackColor=”#CCCC99″> <PagerStyle ForeColor=”Black” HorizontalAlign=”Right” BackColor=”#F7F7DE”> <HeaderStyle ForeColor=”White” Font-Bold=”True” BackColor=”#6B696B”> <AlternatingRowStyle BackColor=”White”></asp:BoundField> <asp:TemplateField HeaderText=”File Name” HeaderStyle-Width=”10%” ItemStyle-Width=”10%” FooterStyle-Width=”10%”> <ItemTemplate> <%# Eval(“fileName”) %> </ItemTemplate> </asp:TemplateField> <asp:BoundField HeaderText=”Created On” DataField=”createdOn” HeaderStyle-Width=”5%” ItemStyle-Width=”5%” FooterStyle-Width=”5%”></asp:BoundField> </Columns> <SelectedRowStyle ForeColor=”White” Font-Bold=”True” BackColor=”#CE5D5A”></SelectedRowStyle> <RowStyle BackColor=”#F7F7DE”></RowStyle> </asp:GridView> Download File: Add a new blank .aspx page to the portal named ‘DownloadFile.aspx’. This page will act as bridge for portal to connect to SharePoint and authenticate for being able to download the file. This file will contain code to authenticate the SharePoint connection for the portal to be able to download the file. DownloadFile.aspx.cs protected void Page_Load(object sender, EventArgs e) { string partialURL = “”; partialURL = Convert.ToString(Request.QueryString[“url”]); downloadFile(partialURL); } private void downloadFile(string relativeURL) { ClientContext cxt = new ClientContext(“https://yourdomain.sharepoint.com/Site1”); var password = new SecureString(); foreach (var c in “password”.ToCharArray()) password.AppendChar(c); cxt.Credentials = new SharePointOnlineCredentials(“username”, password); int pos = relativeURL.LastIndexOf(“/”) + 1; var fileRef = relativeURL; var fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(cxt, fileRef); var fileName = relativeURL.Substring(pos, relativeURL.Length – pos); using (var fileStream = new System.IO.MemoryStream()) { int extpos = fileName.LastIndexOf(“.”) + 1; fileInfo.Stream.CopyTo(fileStream); StreamToFileAttachment(fileStream, fileName); } } void StreamToFileAttachment(Stream str, string fileName) { byte[] byteBuffer = new byte[str.Length]; str.Position = 0; Response.AddHeader(“Content-Disposition”, “attachment; filename=\”” + fileName + “\””); Response.AddHeader(“Content-Length”, str.Length.ToString()); Response.ContentType = “application/octet-stream”; int len = 0; while ((len = str.Read(byteBuffer, 0, byteBuffer.Length)) > 0) { { Response.BinaryWrite(byteBuffer); } Response.Flush(); } } Conclusion Using above code we can download SharePoint Document without actually sharing document with the end user.
Share Story :
CRM Portal and SharePoint Integration
Pre-requisites: CRM 2016 online Portal SharePoint Online CRM Online 2016 [With System Administrator or System Customizer role] In this blog, we will demonstrate how to user SharePoint Document Library for Document Management Using CRM 2016 Online Portal, where you can upload the document directly to SharePoint. Steps for CRM Portal Share Point Integration Step 1: Enable the document management on the entity. You can refer to “Enable SharePoint Integration and OneDrive for Business in CRM”. Step 2: Open an Entity Web form where you want to display SharePoint document library on the portal. Click on the Insert-tab, click on Sub-Grid. specify a name to sub-grid. In “Data Source” section select “Only related Records” from Records dropdown. Select “Document Location (Regarding)” in Entity dropdown. Select “Active Document Location” from Default View section [shown in Below Image]. Click on Set. Click on save then publish the customization. Step 3: Create Entity form. Once the entity web form is published, you need to assign a proper Entity Permission so that SharePoint document library will render properly in CRM portal. In CRM, navigate to Portal -> Entity Forms and click on New to add new Entity Form to CRM Portal. Specify the name of your new entity form, Select the entity where you want to have the document management feature in portal. Then select the Entity web form where we have added document sub grid. If you want to just render only a tab on the portal, then select the name of an tab. if you want to create new record then select the mode as “Insert” but if you set mode to insert then you will not able to see Document Grid. If you want to edit it then you can set mode to “Edit”. When mode is set to edit then Record Source Type is mandatory to select. You can select Query string from drop down and in related query string parameter select “ID” as shown below. If you want portal user to just view the document, then you can set the Mode to “Read Only”. Make sure you have checked Enable Entity permission. Save this record. Step 4: Entity permission Navigate to portal -> Entity Permission. Click on new to add new Entity Permission to enable SharePoint document library in the portal. Create an Entity Permission record specifying the Document Location entity with Parent scope. Select the Regarding relationship for the Parent Scope Relationship and point the Parent Entity Permission lookup to the previous entity permission record. Give the privileges as per the requirement. Step 5: Create Entity List. In CRM, navigate to Portals>Entity Lists and Create a new record Name the record From the Entity Name dropdown choose Entity, where we want to enable SharePoint document management Enable Entity Permissions Scroll to the bottom of the Entity List and add an Edit Action to the Grid Configuration pane as shown below. Leave the Target Type as Entity Form and choose Lead – Edit from the Entity Form dropdown (Which is created in earlier steps) Save the records. Step 6: Now, login to CRM Portal with admin credential. Add new child page by selecting the Entity List which we have created earlier step. Leave web Form and Entity form as blank. And select page templet as per your site configuration. Step 7: once you add the entity List to your page you will be able to see the Grid view. click on View details on the record, it will pop up the Entity form which we have created, where you can see the option to upload the file. We can also see the grid containing documents which are uploaded earlier for that record.