Posts

Create a System Dashboard from a Personalized Dashboard

Image
In this blog, we are going to see how you can create a system dashboard from a personalized one. Requirement: One of my clients created a personalized dashboard and wanted it to be available to all users. We need a system dashboard for that. There is no out-of-the-box (OOB) feature that allows you to convert or copy the personalized dashboard to a system dashboard. One way to achieve this is through a manual process where I have to review each component from the personalized dashboard and then replicate the same in the custom dashboard. This process takes some time, as we also need to check all the properties of each component in the dashboard before copying. I wanted to implement this in a better and quicker way. Let's see how I achieved it. This is the personalized dashboard created by the client. First of all, assign this dashboard to yourself ( the Admin user ). Create a new empty system dashboard inside your solution. Don't add any components; just create and save it.  Exp

Open Windows Email App with To, CC and BCC information from Dynamics

Image
In this blog, we are going see how we can open a windows email app with information from Dynamics CRM. Problem Statement :  As we all know, when we click that little icon on Email field, it open our windows mail app. One of our client, wanted to have that feature with CC and BCC information as well. And this is not supported by OOB feature. To achieve this particular functionality, I have overridden the OOB functionality. Let's see, step by step, how I did it. First of all, find "data-id" for your email field. It is unique for each control. You can find it by Inspect on Email icon of your field. Create a HTML web resource which overrides the Email icon click functionality.  Click here to download the complete code file.  Add this as a component on CRM form. Just make sure, you have this component added in somewhere at the top section of the form as web resource needed to be loaded and also set height as only 1 row so that it would not eat more space. To call the function

Combine two result sets with indicators into one view

Image
Requirement : My client wanted to have a dashboard, where user can see all the published knowledge articles reviewed and yet to be reviewed by the user itself.  CRM stores knowledge article views data into Knowledge Article View table. As per the requirement I have to show two different result sets into one view. One result set for  Reviewed  and another for  Yet To Be Reviewed  articles.  At first, Created a Choice data type column with logical name as mad_knowledgearticleviewstatus  in Knowledge Article table. To show article view status for the user. Here are the options for the same: Note, I have used icons in the label to show the view status. These icons act as an indicator. Blue icon(🔵) is used for  Yet To Be Reviewed  status and White icon(⚪) is used for  Reviewed status. This field wasn't created to store any data, instead data for this field would be dynamically shown based on the logged in user. In the next step, Created a simple view in   Knowledge Article  table t

Check Webresource Dependencies on form

Image
Open  Webresource Dependencies Checker tool in  XrmToolBox . This tool was developed to get all the events attached to a form for a specific or all web resources on the form. You have two options to check dependencies, either by Web Resource or by Entity .  Filter by  WebResource : Type your Script Logical Name and press the  Tab key. It will retrieve all the entities having decencies on the specified script. Select Entity , it will retrieve all the forms which are using the specified script. Select Form , it will show all the events attached to form, from the script. In the result table, you will see the following fields: Webresource Name : Logical Name of the web resource. Control Type : The type of control where an event is registered.  Control Name : Name of control on which event is registered. Function Name : Function name specified in event registration. Event : Trigger for an event. Enabled : Specifies function is enabled or not. Execution Context : Specifies if execution

Apply Custom Filter on Multi-Entity Lookup field

Image
In this blog, we are going to discuss how we can apply a custom filter on multi-entity reference lookup. There was a requirement, to restrict lookup data on From field on Email. From field has the data type of Party List which basically allows you to select a record from the users and queues table. Now, the requirement was to restrict the data in such a way where logged In user can see only the queues of which he was a member, and for the user's table only his record to be shown. As per the requirement, I have to apply two custom filters on the form field for each entity. I never did this before. So, after a lot of research and development found that the solution was too easy. We just have to apply a addCustomFilter function twice(one for each entity). like this: Now I know how I can apply the custom filter on Multi-Entity lookup. It could have done the job for me if my filter on entity was straight forward. But, In this case it wasn't solving my problem as it only works with

Performing CRUD operations between different CRM environments

Image
In this blog, we are going to discuss how to perform CRUD operations between CRM environments. As you all might be aware, there are already existing ways to do data migrations, such as  Data Import , Kingswaysoft SSIS Package , using programs, and so on. Here we are going to perform data migration between CRM environments in a different way to import data with the same record identifier and then we are going to perform read, update, and delete operations on imported data. Prerequisite:  You must have an understanding of the  SQL queries. So, Let's Start. 1. Open  SQL 4 CDS in XrmToolBox. 2. Add connection of source and target environment. In this example target is RND and source is TEST . 3. Write a query to perform operation and execute it. CREATE: Inserting records from source environment to target environment. Here we are inserting only two columns, activityid : record identifier and subject , with a pretext of ' Imported Task: '. So, you can add the columns you want a

Show user login details in a quickest and more flexible way

Image
You all might be aware of the CRM inbuilt  User Audit Access functionality , which shows user login access. I also proposed the same solution to my client, when he asked me about how to check user login date and time in CRM. But, he wanted a user-friendly and flexible way to access this data.  Problem with current inbuilt functionality :      1. Accessing Data                   To access the user login audit data, as a user I have to perform several steps. which is not the quickest or most convenient way. i.e.   Go to Advanced Settings >> Auditing >> Audit Summary View >> Filter Event Column with "User Access via Web".      2. No filter on User Record                     It shows the login data for all users. The filter is not available for the user record, which makes it hard to find login details for specific users or a list of users.  Solution:           To overcome the above scenarios, we are going to build the quickest and more flexible way to show user