Posts

Showing posts from 2017

How to use Angular JS in MS Dynamic CRM 365.

Image
Step 1:   Download the angular js lib. from   Here . Step 2:  Upload this lib. in CRM as a Web resource like this: Step 2:  Create HTML file and Write the angular js code in it. Here i write very simple code. Step 3:  Create HTML Web Resource in your Dynamic CRM and Upload the file that you have created in the last step, as show in below Image. Step 4:  Now apply this Web Resource on any Entity form. Here i applied this on Account Entity. Step 5:  Now reload the page and see the page on which web resource is applied.

Deployment of CRM Portal from one CRM Environment to another Environment

Deployment of CRM Portal from one CRM Environment to another has always been a challenging task for everyone. As I have seen many folks were facing many challenges during CRM Portal deployment and finding for best way to migrate CRM Portal Configuration from Development to Test and Test to Production Environment. CRM Portal provides two ways for Deployment mentioned below : Website Copy Tool - I was like WAOOO...when i got to know about this tool and i have started using it first time to migrate my CRM Portal Configuration from Development Organisation to UAT , but it disappoint me when i found that this tool has so much limitations like : • It does not migrate your Subgrid Entity Forms, so you have to manually recreate it on destination organisation which is very annoying and time consuming. • Along with Subgrid Entity forms, some other configuration you have to create manually like sometimes it does not map correct values in lookup in Entity Forms and Entity List.

CRM Field Editing Ninja

Image
If you need to change some of the field’s behavior such as: Required level Enable/Disable Auditing Flagging the fields to be Searchable or not Rather than opening the fields 1-by-1 to make the change, there is a shortcut to apply the same settings to more than 1 fields: Select the list of fields that require the similar settings, click the  Edit  action to open the “ Edit Multiple Fields ” window to apply the changes to these fields

Microsoft Flow – Create record in Dynamics 365

Image
Recently we received a requirement to integrate a mailbox not configured in CRM and external to CRM with Dynamics 365. The client had an enquiry mailbox, and they did not want the emails to be created in CRM, and therefore it was not configured. However, they did want that the lead should be automatically created for all enquiries received. That is where  Microsoft Flow  came to the rescue. Using Flow, it is possible to design process flows to automate integrations with external systems. Here we discuss the steps to create a lead in Dynamics CRM for every email received on a Gmail id. Steps to create the flow: 1 . Go to  https://portal.office.com  and click the Flow as shown in the screenshot below; 2 . Click on  ‘Create from Blank’  button as shown in the screenshot below; 3 . Select  ‘Gmail – When a new email arrives’,  it will then ask you for the Gmail credentials, enter the appropriate credentials. 4 . Now select  ‘Inbox’  as seen in the screenshot below; 5

Field Validation Editable Grids

Image
Scenario Say I want to get the value of an editable grid cell on change and add some validation on it. I have a field called ‘Contact Code’ and I want to be notified if I enter a value that is less than 4 characters. We need a way to reference the current field that was entered and validate its value. getFormContext Method (Introduced in Dynamics 365) The key is to pass the context object a parameter to the  OnChange  grid event and then use the  getFormContext  method to return the reference of the grid. The handy thing about this is that it can return a reference to either a Form or Grid control depending on where it was called. function EditableGridFieldValidation(executionContext) {     var gridObject = executionContext.getFormContext().data.entity;     var contactCodeValue = gridObject.attributes.getByName('new_contactcode').getValue();     var contactCodeField = gridObject.attributes.getByName('new_contactcode').controls.getByIndex(0);

Show Hide Sections in Dynamics CRM

/************************************************ stateSectionsOnChange - function to handle which fields to show based on the state selected ************************************************/ function stateSectionsOnChange() {     var closeTab = Xrm.Page.ui.tabs.get("Professional Info"); var showTXSection = false;     var showOHSection = false;     var showINSection = false;     switch (Xrm.Page.getAttribute("col_addressstate").getText()) {         case "Texas": showTXSection = true;             showOHSection = false; showINSection = false;             break;         case "Ohio": showTXSection = false;             showOHSection = true; showINSection = false;             break;         case "Indiana": showTXSection = false;             showOHSection = false; showINSection = true;             break;     }     closeTab.sections.get("Texas").setVisible(showTXSection);     closeTab.s

Configure View Columns for Global Search

Recently, I was asked to change the "View Columns" on CRM Global Search. Typically, there is no seperate view for Global Search. It works on Quick find view of the configured entities for Global search, where it looks for "Find Columns" to run its quick find searches. So, I started looking into Quick find view. After little bit research, I found Global Search shows first three columns of Quick Find view in the searches. So I just changed the order of the few columns, moved the requested View Columns to first three and Voila! its done. 

Convert Plugin to Sandbox mode,

While working with Dynamics CRM Plugins, the thumb rule for Plugin Registration is: If you are working with CRM On-Premise, use Plugin isolation mode as  None. If you are working with CRM Online, use Plugin isolation mode as  Sandbox. So, now the scenario is you are working on big implementation for CRM On Premise. Now your organization decides to move to CRM Online. The first task comes to mind is to move all the Plugins to Sandbox mode and see if they are still working considering running Plugin in sandbox comes with some  limitations  (such as you cannot access file system/registries/external assemblies/protocols/IP Addresses etc). To convert the Plugin assemblies to Sandbox mode, one option is to open Plugin Registration tool and convert the assemblies one by one which is a tedious task. The other simple option is do this by Customization.xml file. Below are the steps how to do that. Create a solution with all Plugin assemblies or use existing solution if already a

Data Import Security Role for Dynamics CRM

Recently, someone asked on one of the community forum that what all privileges should be given to allow Data Import to Dynamics CRM. I responded but thought that it would be helpful if I write in one of the blog so that it benefits others as well. If we think of import process to CRM, it works as below: Source file gets uploaded. It will prompt for data mapping. Data Map record gets created and you can start seeing the status for the file being imported under Settings-->Import. Data gets imported and records created. So broadly if someone want to import the records, he definitely should have Create, Read and Write permission on the entity, he wants to import. Along with that he should have privileges on following entities:  Entity  Security Role Tab  Privilege  Import Source File  Core Records User Level  Create, Read, Write, Delete, Append, Append To  Data Import  Core Records  User Level  Create, Read, Write, Delete, Append, Append To  Data Map  Core Records

DYNAMICS 365 - HOW TO KEEP YOUR CUSTOMERS UPDATED WITH THEIR CASES

Image
One of the keys to increase the usability of the interaction with your customers, and to adopt your system, is to notify you customers with your Dynamics users updates on a case. A tip of doing this, is to set a workflow to be triggered when a note is created on a case, the workflow will send an email to the customer, updating him/her with the note description. You can do this by following the below steps, 1. Create workflow to run on Note entity 2. in the workflow, add a condition to check if the note is regarding a case. 3. If the condition is met, then send email to the customer and place the note description in the email. 4. Save and activate the workflow. Thanks :)

Business Rules Vs Rollup Fields Vs Calculated Fields

Feature Trigger Execution Client / Server Scope Conditions Fields Functions Limits Usage Business Rules On Load On Change Synchrounous / Real Time Execution order: First: System JavaScripts Then: Custom Javascript   Finally: Business Rules Client: Specific Forms/ All Forms/ Server Entity / All Forms / Specific Forms And / OR, not a mixure All Fields on the form body Show Error Message Set Field Set Business Required Set Visibility Set Default Value Lock / Unlock Field Fields updated through Business Rules do not trigger the fields on change event of JavaScript. Reducing potential of infinite loop. Perform field validations and apply field logic to improve user input and experience Rollup Fields On Save / Every 1-12 hours / When User Presses Rollup Refresh Button Asynchronous / Every 1-12 hours Rollups are calculated by scheduled system jobs  Settings  >  System Jobs  >  View  >  Recurring System Jobs . System Job type: Mass Calculate Rollu

Multi-Select Option Set in Dynamics 365

Image
A new feature "Multi-Select Option Set" is introduced in Dynamics 365. Very useful feature, it will reduce lot of effort for the developers. In one of our project we used an external IP to implement this. Few screen shots on this awesome feature.

RETRIEVE OPTIONS LIST IN MULTIPLE LANGUAGES in DYNAMICS 365

If you had a requirement where you want to retrieve a list of options of an option set in your CRM/365 organization depending on the language, for example if you pass to the method 1025 it will return the options in Arabic, if you pass 1033 it will return the options in English and so on. For example, if you are integrating your Dynamics 365 with a portal, and you want to create a drop down list of these options coming from an option set in the 365, and this options maybe changed in the future, so its not practical to change the drop down list options. In this case, I'm going to give you a code I was using to listing data from CRM 2016 to SharePoint 2016. public Dictionary<int, string> LocalOptionSetList(String entityName, String optionSetName, int lcid)         {             try             {                 if (lcid == 0)                     lcid = 1033;// default english                 using (var xrmContext = new XrmServiceContext(CRMConnection.CRM))