Blog Archives - Page 160 of 169 - - Page 160

Category Archives: Blog

Download SharePoint file programmatically without sharing it – Dynamics CRM and ADX portal or custom portal

Posted On August 18, 2016 by Admin Posted in

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

Posted On August 17, 2016 by Posted in

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.  

Share Story :

Feedback and Rating in CRM 2016 Update 1

Posted On August 16, 2016 by Posted in

Microsoft Dynamics Update 1, provides a new option to track the feedback and ratings for the records that are present in CRM i.e. allows customers to write feedback and track response or provide rating for a particular record. Select the Entity for which you want to track Feedback for e.g. Accounts. So a new option “Feedback” appears on General Tab under the heading of Communication and Collaboration on Entity Level. Once this option is checked it creates a 1: N Relationship between Account and Feedback Entity. So we open Account Record we can see Feedback option So now we can create a feedback for this record. The first section of the form tracks the basic details like the Title, Comments, Regarding and Source. Regarding tracks information for which the feedback is created. Source by default has two option: Internal and Portal. We can also add options as per our requirement. While the second section on the form tracks the rating for the record with three fields: Rating Minimum Rating Maximum Rating Based on the values provided on the above three fields the normalized value is calculated. By default, the business rule is written on Normalized Rating field present on header of the page. Normalized Rating field can also hold the negative rating value. This happens when the Rating value is less than the Minimum Rating Value. So the business rule can be changed according to the user requirement to avoid the negative normalized values. Also in case of multiple feedbacks a simple rollup field can be used to keep the count for number of feedbacks for that particular record. So this is how we can track the Feedback and Rating in CRM.  

Share Story :

Introduction to Azure Event Hubs

Posted On August 8, 2016 by Posted in

Overview Microsoft Azure Event Hubs is a managed platform service that can intake a large amounts of data for various scenarios. It is a highly scalable, low latency and highly-scalable data ingest system. Data is ingested here in the form of events. Event Publishers submit data to the Event Hub and Event Consumers consume the data at their own time. Some scenarios where Event Hubs are applicable are – Application Instrumentation, user experience, Internet of Things (IoT) Event Hubs reside in the Service Bus namespace. Event Hubs uses AMQP and HTTP as its primary API interfaces.   Below diagram will give a high level overview of where Event Hubs lie:   Partitions in Event Hubs Partitions are ordered sequence of events that reside in the event hubs. Newer partitions are added to the end of the queue as they arrive. Partitions retain data for a configured period of time. This setting is common across all partitions in the Event Hub. Every partitioned is populated at their own pace and not necessarily sequentially. Hence, data in partitions grow independently. of partitions are specified while creation of Event Hubs. This number should be between 2 and 32. Default partitions allotted are 4. The number of partitions you choose are more related to the number of concurrent consuming applications you expect to have. This partition count cannot be changed once the event hub is created.   Event Publishers So who are event publishers? The entities that populates data to the event hubs are the event publishers. Event publishers can publish data to the event hubs either using HTTPS or AMQP 1.0. Event publishers use a SAS (Shared Access Key) token to authenticate themselves to Event Hubs.   Common Tasks for a Publisher Acquire an SAS Token SAS is the authentication mechanism for Event Hubs. Service Bus provides SAS policies at the namespace level and at the Event Hub level. Service Bus can regenerate the key and authenticate the sender.   Publishing an Event Service Bus provides an EventHubClient class for publishing events to an Event Hub from .NET clients. Events can either be published individually or batched. A single publication has a limitation of 256 KB, whether batch or individually. Publishing events larger than this will result in error.   Partition Key It is a value to map incoming messages to the specific partitions for data organization purpose. This is a sender supplied value passed to the event hub. It is processed through a hashing function which creates the partition assignment. Partition Keys are important for organizing data for downstream processing. Below Diagram explains how Partition Key work:   Event Consumers An entity that reads event data from Event Hub is an event consumer. All event consumers read from the partitions in the consumer group. Each partition should only have one active reader at a time.   Consumer Groups A consumer groups is a view (state, position, or offset) of the entire Event Hub. Consumers groups lets consuming applications have a separate view of the entire Event Hub. There is always a default consumer group. You can create up to 20 consumer groups in an Event Hub.   Stream Offsets & Checkpointing An offset is a position of an event within a partition. It is a client-marker to specify at which point should the processing should happen from. Consumers should store their own offsets. Checkpointing is a process where readers mark their position in a partition in the event hubs. Common Consumer Tasks All consumers connect to the Event Hub via AMQP 1.0. It is a session and state-aware bidirectional communication channel. As a partitioned consumer model, only 1 consumer can be active on a partition at a time within a consumer group. The following data is read from the Event Hub Offset Sequence Number Body User Properties System Properties. As mentioned above, it is user’s responsibility to maintain this offset. So now you know about Event Hubs! Summary Azure Event Hubs provide high-scalable, telemetry processing service that can be used for common applications. Event Hubs provide low latency. In the next part of the blog, I’ll be covering a technical look at the Event Hubs wherein Dynamics CRM will publish data to the Event Hubs and how data is available for applications to consume! Watch out here for the upcoming blog very soon! Hope this overview was helpful.  

Share Story :

How to register Plugin Dynamically?

Problem Definition How to register the steps of the plugin Dynamically (programmatically). Introduction Generally, after the plugin development, users register the plugin and steps using plugin registration tool provided by the CRM SDK. But, in certain cases it is possible that the user may need to register the step in the plugin dynamically. For example: Whenever a new entity is added it should have an auto number step registered automatically for that entity. Description Here I have created a sample plugin with no logic. I will register this plugin programmatically using console app. To register the plugin programmatically. We need the following steps to be executed. Connect to CRM Create a record of type “pluginassembly” Create a record of type “plugintype” Create a record of type “sdkmessageprocessingstep” Connect to CRM Since we are registering the plugin using console application we need to connect the CRM instance before processing the steps. Organization service is required to create a record in CRM. Please make sure you add the below references to the code. using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Tooling.Connector; using System; using System.IO; using System.Reflection; You can refer the below code the connect with CRM public void ConnectCRM() { string connectionString = “Url=https://XXXX.crm.dynamics.com; Username=XXXX.onmicrosoft.com; Password=**********; authtype=Office365″; // Connect to the CRM web service using a connection string. CrmServiceClient conn = new CrmServiceClient(connectionString); // Cast the proxy client to the IOrganizationService interface. _orgService = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy; // Obtain information about the logged on user from the web service. Guid userid = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).UserId; } Create a record of type “pluginassembly” Once the connection is successful, we need to register the Plugin Assembly. Here, we need to provide the physical path of the .dll that we need to register. While creating a record we need to provide the required field value which are listed below. You can find list of attributes required, by looking into the excel sheet provided by Microsoft. You can find this excel sheet in the SDK with the name “EntityMetadata” Attributes required: Code: public Guid RegisterAssembly() { string filePath = @”D:\Plugin_Dynamically\Sample.Plugin.Dynamically\Sample.Plugin.Dynamically\bin\Debug\Sample.Plugin.Dynamically.dll”; Guid assemblyId = Guid.Empty; try { var assembly = Assembly.LoadFile(filePath); string[] props = assembly.GetName().FullName.Split(“,=”.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); Entity assemb = new Entity(“pluginassembly”); assemb[“name”] = props[0]; assemb[“culture”] = props[4]; assemb[“version”] = props[2]; assemb[“publickeytoken”] = props[6]; assemb[“sourcetype”] = new OptionSetValue(0); // 0= database; assemb[“isolationmode”] = new OptionSetValue(2); // 1= none, 2=sandbox assemb[“content”] = Convert.ToBase64String(File.ReadAllBytes(filePath)); assemblyId = _orgService.Create(assemb); } catch (Exception) { throw; } return assemblyId; } Once the Assembly is registered you will able to see the below steps in plugin Creating the plugintype record A plugintype record must be created for each plugin inside the assembly. This can be done dynamically using reflection. We need to specify the below required field You can refer the below code for the registration of Plugin Type. The assemblyId is the Guid created on the earlier step. public Guid CreatePluginType(Guid assemblyId) { Guid pluginTypeId = Guid.Empty; Entity pluginType = new Entity(“plugintype”); pluginType[“pluginassemblyid”] = new EntityReference(“pluginassembly”, assemblyId); pluginType[“typename”] = “Sample.Plugin.Dynamically.Dynamic”; pluginType[“friendlyname”] = “Sample Plugin Dynamically”; pluginType[“name”] = “Register Plugin”; pluginType[“description”] = ” Sample Plugin Dynamically”; pluginTypeId = _orgService.Create(pluginType); return pluginTypeId; } This is how it will look like Creating the sdkmessageprocessingstep record At the end we need to create the step to process the request. For example, if you want to register the plugin for the create of the account entity. You need to have two id retrieved from CRM separately. Sdkmessageid: you will get this in from the sdkmessage entity you need to provide name as shown below. Sdkmessagefilterid: You will find this id using Query shown in the below screen shot You can refer the below code to perform the operation public void SdkMessageStep(Guid pluginTypeId) { Guid messageId = new Guid(“9EBDBB1B-EA3E-DB11-86A7-000A3A5473E8”); Guid messageFitlerId = new Guid(“C2C5BB1B-EA3E-DB11-86A7-000A3A5473E8”); Entity step = new Entity(“sdkmessageprocessingstep”); step[“name”] = “Sdk Message”; step[“configuration”] = “Create account record”; step[“invocationsource”] = new OptionSetValue(0); step[“sdkmessageid”] = new EntityReference(“sdkmessage”, messageId); step[“supporteddeployment”] = new OptionSetValue(0); step[“plugintypeid”] = new EntityReference(“plugintype”, pluginTypeId); step[“mode”] = new OptionSetValue(0); step[“rank”] = 1; step[“stage”] = new OptionSetValue(20); step[“sdkmessagefilterid”] = new EntityReference(“sdkmessagefilter”, messageFitlerId); Guid stepId = _orgService.Create(step); } Once the above step is executed successfully you will see the plugin as shown below Conclusion Even though we have plugin registration tool available to register the plugin using plugin registration tool we can also register the plugin programmatically in certain scenario.  

Share Story :

Contractor access in PM Solution

Posted On July 11, 2016 by Admin Posted in

Summary This feature enables administrator to provide access to contractor using Project Management solution.  User (contractor) should be able to see only assigned projects, tasks, billing codes and easily be able to enter time against project. User will not able to see any value in money fields present on project/task/billing code. If User want to see any money related field, then administrator have ability to customize this requirement according to business need. Only system administrator and manager will able to view all fields value present on project, project task and billing code. Pre- Requisites 1. User with system administrator role in CRM 2. Project Management solution should be installed. If you don’t have solution, please contact support@cloudfronts.com or navigate to for more information. Steps 1. Create user in Office 365 and assigned CRM licenced. (e.g. CRM Essential) 2. Assigned PSM Core role and PSM Project Team Member to user. 3. We will go through two different scenarios in Project Management solution When Contractor logged into the CRM When Manager/Administrator logged into the CRM Scenario 1:  When Contractor logged into the CRM In current scenario user mihir kadam(contractor) is logged in to the CRM. Mihir kadam will able to see only limited entities and web resources based on security permission. We can customize this as per requirement.   Click on Project Entity to see what all details are visible to the user. Mihir kadam is able to view only one project because he has added as team member to only one project by project manager (Kuldeep Gupta). In project entity view, following fields are empty because user does not have enough permission to view this fields. 1. Actual revenue 2. Total budget   If Mihir kadam want to do time entry for any project, then he has to navigate to Timesheet from project management navigation menu.   Scenario 2: When Manager/Administrator logged into the CRM In current scenario user Kuldeep Gupta(Manager) is logged in to the CRM. Kuldeep Gupta will able to see all entities and web resources based on security permission.   Click on Project Entity to see what all details are visible to the user. Kuldeep Gupta is able to view only all projects but modification is allowed only for owned project. Open record to view more details about project. If you notice Kuldeep Gupta is able to read all information including Total budget and actual revenue. Conclusion By using Contractor access in Project management solution any outside consultant can do time entry for ongoing project without knowing company’s actual revenue/ budget/ rate.

Share Story :

Company News Timeline for Phones and Tablets in CRM 2016 Update 1

Posted On June 23, 2016 by Posted in

Introduction This feature enables users to get the latest news about the customers on Phone or Tablets. Users can now view the news related to Account, Lead, Contact, or Opportunity in CRM. You can now view news related to an Account, Lead, Contact or Opportunity in the CRM app on your mobile device. The Company news timeline solution for mobile enables sales and service users to view the latest and most important news in the mobile client from Bing news. The news articles are organized by time (Today, This Week, Last Week) and contain the headline, date/time, and source of the news article.  Important events are detected and categorized (including Management Changes, Earnings Releases, New Offerings, Cost Cutting, Growth, Legal Issues, Acquisitions and Partnerships).   Pre- Requisites User with Global Administration Login can install the solution in the system.   Steps Under Admin Centre Click on CRM. Under Manage all CRM instances, select the instance in which we want to install the solution. Below Screenshot shows the list of solutions that are either installed or uninstalled. Select the Company News Timeline solution, and then click Install. Proceed through Terms of service to accept the terms. Once the installation is completed, Users can view the news related to Account, Contact, Lead and Opportunity in CRM Mobile App. Once you enable the Company News Timeline solution, Customer Data from the address, name, and industry fields of your account records will be directed to Bing. Hence, the Customer Data sent to Bing to fetch the related data. So for example if we have Google as account, so on scrolling to the right hand side in the Mobile App we can see the section with heading as “Active News”. And Under that section user can view all the news related to that particular account. These news articles further are organized as Today, Yesterday or a week before article.  

Share Story :

Add or Edit Power BI Tiles in CRM Dashboard

Posted On June 20, 2016 by Posted in

Prerequisite: Latest CRM Update1 version environment account (purchase account not in trial account), Power BI account Purpose of the setup: Embed Power BI tile in CRM dashboard. Procedure: Here we have a CRM Update1 purchase account where I will be demonstrating the new feature in CRM where we can embed Power BI tiles in CRM dashboard. Before we actually start embedding Power BI Tile into CRM dashboard we first need to do some setting for enabling Power BI tile option in toolbox. Note: Only available in Purchase account with CRM Update1 Feature.     Once we are done with these basic setting we can start creating Dashboard in CRM. For that click on the hamburger menu -> goto Sales Area -> click on Dashboard Entity. Then click on ‘New’ option in the ribbon at the top. On clicking on ‘New’ option it will ask the type of layout you need.   Select the type of Layout you need among the options provided. Give appropriate name to the dashboard. Now after the enabling of Power BI tile in CRM dashboard we can see a new option to import Power BI tile in our dashboard. Click on the POWER BI TILE option in the ribbon. A new window will appear which will contain the list all dashboards and related tiles. Select the Power BI Dashboard you want and then select the Tile from that dashboard. The selected tile will be displayed below in the same window. Once you get the appropriate tile you need click on OK. You can see the Power BI Tile in the CRM dashboard. Note:  We need to have Power BI account linked with this CRM account to get the dashboard and tiles details. Similarly, go on repeating the steps to get other tiles in the CRM dashboard. When done with designing the dashboard click on SAVE. Your Dashboard will be saved. Now, if you want to view the Dashboard again then follow the same steps Hamburger menu -> Sales Area -> Dashboard Entity. Click on the dashboard list and in MY Dashboard type we will get the dashboard created by us.   The created dashboard will be displayed.  

Share Story :

Login Based Security in Power BI

Posted On May 26, 2016 by Posted in

Prerequisite: Power BI Desktop Tool, Power BI Online Service Purpose of the setup: Purpose of this blog is to demonstrate USERNAME () function with Row Level Security (RLS) using Power BI to get the dynamic security when users login. Procedure: To demonstrate this, we have created a Power BI Desktop file and published it to Power BI Online service account. Now the basic steps for creating role based security is explained in our previous blog on RLS in Power BI. You can refer the steps in the link given below: https://www.cloudfronts.com/row-level-security-using-power-bi/ In the above mentioned link we used DAX function as [Sales Manager] = “Ashish” i.e. we have hard coded the DAX Function to filter data only for specific records. The drawback is that we need to hard code for every user in the organization no matter how many users are present. So, now we can make use of USERNAME() function which will automatically filter the data depending on the username used to login to Power BI service account. You can read more about this update in the Power BI blog given in the link below. https://powerbi.microsoft.com/en-us/blog/using-username-in-dax-with-row-level-security/ Here, USERNAME() is used to get the current logged in user and filter the data accordingly so as to enable him to view his own data. Below is the screenshot of dataset used. Fig 1: Dataset used for Performing RLS   In the Example, Ankita is the CEO (i.e. the one who has Admin rights) so she can see all the data in the dashboard. Whereas Ashish and Prakash are the two Sales Manager who when logs in can view only their data i.e. data for them and the Sales Person in their team. Fig 2: CEO/Admin Dashboard   Now if the CEO wants to restrict the Sales Manager and Sales Person to view only at their level i.e. the Sales Manager can view data under his team and a Sales Person can view only his data as an owner. For achieving this the CEO can share the dashboard to the person and then can assign the role. The steps are similar to the steps demonstrated in the previous Blog the only thing to change is the DAX function. The DAX function used is [Sales Manager] =USERNAME () Fig 3:  Creating Role   Now we are done with RLS in Power BI with USERNAME () function. So when person named Ashish logs in with his Power BI account with username as ajagdale@cloudfronts.com, he will only be able to view his own data. Here, data in same RLS_USERNAME_SECURITY dashboard shared with Ashish displays only data for ajagdale@cloudfronts.com as the Sales Manager. Fig 4: Sales Manager (Ashish’s) Dashboard   Note:  The column on which we are applying the USERNAME () function has to be the Login id (or username) which is used to log in to Power BI account so that the function can filter depending on username. It may happen that the result is not visible immediately. So for that we can refresh the Power BI dashboard once. Similarly, we can add another person to the same role created and he will also be able to view his own data. For example, another Sales Manager named (say) Prakash logs in to Power BI with his email as pkavar@cloudfronts.com then he will also be able to view pkavar@cloudfronts.com as Sales Manager. Fig 5: Sales Manager (Prakash’s) Dashboard   In this way as many users we will add in the role we can create Row level security for them.  

Share Story :

Enable SharePoint Integration and OneDrive for Business in CRM

Posted On May 23, 2016 by Posted in

The blog article tells user how to integrate SharePoint and OneDrive for Business CRM to store the CRM related documents. Let’s see the steps to enable SharePoint and OneDrive for Business. Pre–requisites User needs to be Office 365 Global Administration to enable Server Based SharePoint. User needs to have Microsoft Office 365 Plan E3. Steps to Enable SharePoint Integration Step 1: Under Default Admin Page, Select SharePoint. Under SharePoint, note down the Public Website URL. Step 2: Under Settings, select Document Management Option. Step 3: Select Enable Server Based SharePoint Integration Once step 3 is done, user needs to provide the URL that was noted in Step 1. Enter the URL and select OK. System will validate the URL provided in previous step and once the status is Valid, click Next. Below Message will be displayed saying that Server Based SharePoint Integration is completed and under Document Management Settings, setup the folders for respective entities.   Step 4: Now Under Document Management Settings, select the list of entities for which document management should be enabled. Step 5: Click Next Now the user can see the status of all entities enabled for document management.   Steps to Enable OneDrive for Business Note: Without Enabling Server Based- SharePoint Integration, OneDrive for Business cannot be enabled. Step 1: Under Settings, select Document Management Option. Step 2: Under Document Management, select Enable OneDrive for Business Option. Step 3: Click on Enable OneDrive for Business Option. Once OneDrive for Business is enabled, user needs to configure folder settings. i.e. user will have to setup where personal documents can be stored. Step 4: So under OneDrive for Business Folder settings, select the folder and click OK. Now say if a user wants to add documents to Account Record. User will open that account record, and then select Documents. Step 5: Under Documents Associated Grid, Upload Document. Step 6: Choose the file to Upload and in CRM folder, select OneDrive. Since the user is uploading files for the first time, he will get a confirmation box where he can change the folder location or continue using the same location as provided under Step 4. Conclusion Thus by using above simple steps, SharePoint of Integration and OneDrive for Business can be enabled in CRM to store all the CRM related Documents.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange