Tag Archives: JavaScript with MS CRM

Introduction

Sometimes, we need to show multiple Entity record in the Look up of single Entity Look up in CRM 2013 like the Picture shown below. This Look up Dialog Box shows the record of two Entities, but the Look up is only of Contact

Background

In One of our previous Blogs CRM 2011 Multi Pick list, we have discussed about creating Multiple Pick List in the MS Dynamic CRM form. But the previous post was for CRM 2011. As the CRM 2013 is supported across different browsers, we have to change a little in the code to make it compatible for all major browsers. Here is the modified Blog for Multi Pick List in MS Dynamics CRM 2013.

Let’s start

In this article, we will create a Multiple Pick List for Dynamic CRM form. User can enter multiple data from Pick List by CheckBox. This will also work on all the four major browsers (IE, Firefox, Chrome and Safari).

Requirement

There was a requirement in a project, where user wanted to select, not only one, but also multiple value from a Pick List.

Solution

Steps which are needed to be followed:-

Creation of Field.

Create Web Resource.

Add function to the form.

Creation of Field

There are two fields which are created on the entity you want to make Multi Pick List :-

Introduction

Generally, we add a Signature at the bottom of Email before we send. One of my projects needed the same requirement. We need to insert one Signature Email Template into the description body of Email Form on form load. I have found a solution and now I am going to describe it.

Steps

Create a web resource of Script type and add to the Email Form library

Introduction

As we know, in MS CRM, we always try to find solution of any requirement through Out Of The Box. It doesn’t mean that, we can’t do it by writing code. But Out of The Box gives better performance. So, let’s discuss how to create records through Dialog Process and do fields mapping with the Parent Record.

Background

According to one of my project requirement, we had to create new record(s) on custom button click, from one existing record and that will be done only through Dialog Process. Before record create, in background, some of data from parent record should automatically get populated to new record’s fields (i.e. Fields mapping). I have found a solution by doing some research.

Steps

Let’s explore step by step.

Here I will open Dialog Process from existing Contact record and create Contact and Opportunity records through dialog sequentially.

Step 1: Create a Process of Dialog Category

Step 2: Add a step of “Page” and under which add “Prompt and Response” step, then click “Set properties” to to create control for record inside dialog

See the following picture.

Step 3: Mapping Dialog Fields with Contact Fields

After creating all fields required, add a step of “Create record” from Add Steps DropDown. Then choose the record type and click “Set Properties“. Here we will be able to do fields mapping using both Parent data and Dialog Fields data.
The Red colored box on the right side is showing all fields contains in Dialog. Map those fields with corresponding fields in Contact.

Step 4: Populating Parent Fields data to New Record

The Red Colored box showing fields mapping between Parent record and New record. Same way choose any field and map that with field of Contact

Step 5: To set Parent record with one Lookup field of new record

Follow the below Picture.

Step 6: To add a created record’s link in the end of Dialog

Add a new page and again add a step of “Prompt and Response” under it. Then click Set properties and follow the below image. After that activate the Dialog Process.

Step 7: Script to open created Dialog on Button Click

Copy the Id of the new Dialog Process from location bar and then do the following

Introduction

Today I got a requirement to add a custom Ribbon Button in the SubGrid of Marketing List Entity and execute some logic and refresh the Grid. Last point was the trickiest one for me and that is why I decided to share the approach how to do it.

Steps

To achieve this, let’s go step by step.

Step-1: Create a JavaScript library that will be executed when Button is Clicked