Signup as a Tutor

As a tutor you can connect with more than a million students and grow your network.

MS Dynamics CRM

MS Dynamics CRM

Trending Questions and Lessons

Follow 2,045 Followers

Ask a Question

Feed

All

All

Lessons

Discussion

Lesson Posted on 12/10/2017 IT Courses/MS Dynamics CRM

Plugins In Microsoft Dynamics CRM

Sumit Gupta

Having total 5 years of experience in software development and implementation. Proficient in doing...

Microsoft Dynamics CRM plug-ins are one of the most commonly used and powerful approaches to extending the application. A plug-in for CRM is custom code, written and compiled in .Net, that is “triggered” when a specific event takes place within a specified CRM entity. The objective of custom... read more

Microsoft Dynamics CRM plug-ins are one of the most commonly used and powerful approaches to extending the application. A plug-in for CRM is custom code, written and compiled in .Net, that is “triggered” when a specific event takes place within a specified CRM entity. The objective of custom plug-in code is to enhance or modify the standard features/behavior of CRM by injecting custom business logic into the execution of nearly any task a user performs in CRM.

Plugin code can be triggered to run when a record is created or updated or perhaps even when a group of records are queried. The Microsoft Dynamics CRM system contains a wide array of these events, commonly referred to as system “Messages”, from which custom code can be triggered. The Messages (which are technically web service operations) are constantly available to run as CRM recognizes events within the platform and sends requests to the respective message for the custom logic to interact with your data.

The plug-in code can be written to run before or after, say, a save operation is completed, thus allowing the developer to work with the context of data when writing the new business logic. This allows a programmer to read and analyze the current data and environment to help design the custom business logic.

When plug-ins are triggered through the messaging system, they can be configured to run in various Steps of the execution pipeline within CRM: pre-event and pre-validation, pre-event and pre-operation, and post-event. The step is the “when” of the plug-in execution. These stages are important factors in designing how a plug-in can create the desired outcome for custom business logic.

Another critical concept behind plug-ins is the Image. An image, created when a plug-in is registered within CRM, is a “snapshot” of an entities data context before (pre-image) or after (post-image) the execution of the operation which triggered the plug-in. Again, access to the fields and values of an image provide the developer with valuable context needed when writing the custom business logic.

While plug-ins are a .Net assembly, they are unique in that are “registered” within the Microsoft Dynamics CRM framework. There are a number of important concepts to understand when writing plug-ins.

  • Understanding data context that is available to plug-ins when run through different messages and at different stages.
  • Using Steps and Images when registering plug-ins.
  • Exception handling within plug-ins (link).
  • Using Impersonation in plug-ins.
  • Challenges with debugging a plug-in.
read less
Comments
Dislike Bookmark

Lesson Posted on 11/10/2017 IT Courses/MS Dynamics CRM

MS Dynamic CRM Client Side Scripts

Jayakar Reddy

? Implementation of MSCRM 2011, 2013, 2015,2016 and Dynamics 365 ? Customizing MSCRM 2011, CRM 2013,...

Get the value from a CRM field: var value = Xrm.Page.getAttribute(“CRMFieldLogicalName”).getValue(); Set the value of a CRM field:Xrm.Page.getAttribute(“CRMFieldLogicalName”).setValue(“New Value”); Get the value from a CRM OptionSet field:var value = Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).getValue(); Get... read more

Get the value from a CRM field:

var value = Xrm.Page.getAttribute(“CRMFieldLogicalName”).getValue();

Set the value of a CRM field:
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setValue(“New Value”);

Get the value from a CRM OptionSet field:
var value = Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).getValue();

Get the text from a CRM OptionSet field:
var text = Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).getText();

Set the value of a CRM OptionSet field:
Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).setValue(“1″); // OptionSet Value

Get the selected text of a CRM OptionSet field:
Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).getSelectedOption().text;

Get the selected value of a CRM OptionSet field:
Xrm.Page.getAttribute(“CRMOptionSetLogicalName”).getSelectedOption().value;

Get the text and value of a CRM Lookup field:
var lookupObject = Xrm.Page.getAttribute(“CRMLookupLogicalName”).getValue();
lookupObject[0].name; // text of lookup
lookupObject[0].id; // Guid of lookup

Set the value of a CRM Lookup field:
var lookupData = new Array();
var lookupItem = new Object();
lookupItem.id = “4A2A54CB-349C-E111-8D26-1CC1DEE8DA78″; // Guid of record
lookupItem.name = “New Contact”; // Entity record name
lookupItem.entityType = “EntityLogicalName”;
lookupData[0] = lookupItem;
Xrm.Page.getAttribute(“CRMLookupLogicalName”).setValue(lookupData);

Disable CRM field:
Xrm.Page.ui.controls.get(“CRMFieldLogicalName”).setDisabled(true);

Hide CRM field:
Xrm.Page.ui.controls.get(“CRMFieldLogicalName”).setVisible(false);

Hide a Tab in CRM:
Xrm.Page.ui.tabs.get(“tabName”).setVisible(false);

Hide a Section in CRM:
var tab = Xrm.Page.ui.tabs.get(“tabName”);
tab.sections.get(“sectionName”).setVisible(false);

Set the Requirement level in CRM:
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setRequiredLevel(“required”);
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setRequiredLevel(“none”);
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setRequiredLevel(“recommended”);

Set Focus on a field in CRM:
Xrm.Page.ui.controls.get(“CRMFieldLogicalName”).setFocus(true);

Cancelling Onsave Event in CRM:
event.returnValue = false;
return false;

Check IsDirty in CRM field:
var isDirty = Xrm.Page.getAttribute(“CRMFieldLogicalName”).getIsDirty();
alert(isDirty); // returns true if the field is dirty

Check IsDirty for all the fields in CRM:
var isDirty = Xrm.Page.data.entity.getIsDirty();
alert(isDirty); // returns true if any of the field is dirty in the entire form.

Force Submit a read only field in CRM:
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setSubmitMode(“always”);

Preventing an attribute to be saved in CRM form:
Xrm.Page.getAttribute(“CRMFieldLogicalName”).setSubmitMode(“never”);

Get Unique Organization Name in CRM:
Xrm.Page.context.getOrgUniqueName();

Get Server url in CRM:
Xrm.Page.context.getServerUrl();

Get the record Id in CRM:
Xrm.Page.data.entity.getId();

Get the User Id in CRM:
Xrm.Page.context.getUserId();

Get the Entity Logical Name in CRM:
Xrm.Page.data.entity.getEntityName();

Get the UserRole Id’s in CRM:
var userRoles = Xrm.Page.context.getUserRoles();
for (var i = 0; i < userRoles.length; i++)
{
var userRole = userRoles[i]; // returns the Role Id
}

Get the Form Type in CRM:
Xrm.Page.ui.getFormType();

Form Types in CRM:
Is the user creating a new record?
Xrm.Page.ui.getFormType() == 1

Is the user updating an existing record?
Xrm.Page.ui.getFormType() == 2

Is the user unable to update this record?
Xrm.Page.ui.getFormType() == 3

Is this record deactivated?
Xrm.Page.ui.getFormType() == 4

Is the user using the Quick Create form?
Xrm.Page.ui.getFormType() == 5

Is the user using the Bulk Edit form?
Xrm.Page.ui.getFormType() == “6″

Save a record in CRM:
Xrm.Page.data.entity.save(); // for saving a record
Xrm.Page.data.entity.save(“saveandclose”); // for save and close
Xrm.Page.data.entity.save(“saveandnew”); // for save and new

Close the form in CRM:
Xrm.Page.ui.close();

Open EntityForm in CRM:

Xrm.Utility.openEntityForm(“opportunity”, Xrm.Page.data.entity.getId());

Get all Active process Stages:

var ProcessStages = Xrm.Page.data.process.getActiveProcess().getStages().getAll();

Set Business process Satage:

Xrm.Page.getAttribute(“stageid”).setValue(ProcessStages[0].getId());

read less
Comments
Dislike Bookmark

Lesson Posted on 22/09/2017 IT Courses/MS Dynamics CRM

Architecture of Business Process Flow in Dynamics 365

Sumit Gupta

Having total 5 years of experience in software development and implementation. Proficient in doing...

Business Process Flows till CRM 2016 Every record with Business process flow till Microsoft Dynamics 2016 , used to have two attributes specific to them:- Process ID : Process Stage ID. To set a desired Business Process Flow, on a record based on some input from the Quick Create form in CRM as follows... read more

Business Process Flows till CRM 2016

Every record with Business process flow till Microsoft Dynamics 2016 , used to have two attributes specific to them:-  Process ID : Process Stage ID.

To set a desired Business Process Flow, on a record based on some input from the Quick Create form in CRM as follows :-

  1. Let’s say over the “Quick Create” form, we have a Business Stream “O” and Sub Business Stream “Renovation”, the selected value will be available to us in the plugin registered over “Pre-Operation”.
  2. Based on the value, available to us we need to fetch the GUID of the desired business process flow from the processes entity along with the process id using the retrieve operation in MS CRM
  3. We can now, set the values of the Process ID and Process Stage ID based upon the retrieved values from the CRM, using the same plugin registered over “Pre-Operation”, and thus when the form will be loaded after creation, it will have the desired business process flow over the same.

Entity.Attributes [ProcessId] = workFlowId



Business Process Flow in Dynamics 365

There has been a change in the architecture of the “Business Process Flow” entity in the Dynamics 365, earlier till 2016 whenever we used to switch the business process flow over a record, then the stage of the switched business process flow used to set to default stage over the entity form.

To overcome the same, in Dynamics 365 the architecture has been changed and now though we switch the business process flow the stage is not set to default.

For the same a new message has been introduced in Dynamics 365 – SetProcessRequest

Contains the data that is needed to set another business process flow instance as the active process instance for the target entity. If there isn't any active business process flow instance for the target entity record and the specified business process flow definition, a new business process flow instance will be created and set as the active instance.

 

SetProcessRequest setProcessRequest = newSetProcessRequest ()

{

Target = Entity.ToEntityReference (),

NewProcess = entBusinessProcessFlow.ToEntityReference ()

};

 

read less
Comments
Dislike Bookmark

Looking for MS Dynamics CRM Training

Find best MS Dynamics CRM Training in your locality on UrbanPro.

FIND NOW

Lesson Posted on 25/11/2016 IT Courses/MS Dynamics CRM

Developing integration utility with Microsoft Dynamics

Sumit Gupta

Having total 5 years of experience in software development and implementation. Proficient in doing...

We all know that the evolution of the technologies has been tremendous in couple of years, leading to development and implementation of the systems in more compact and well integarted way. Each day a new system is introduced in the technological market with some extra features and obivously making it... read more

We all know that the evolution of the technologies has been tremendous in couple of years, leading to development and implementation of the systems in more compact and well integarted way.

Each day a new system is introduced in the technological market with some extra features and obivously making it a complusion for getting it integrated with the existing system, and especially with the system like "Dynamics" which play a major role in the organisations sales and revenue generations

The best part about the Microsoft Dynamics CRM is its ease and open web services which really makes it a much easier to implement and undertake the integration of the services 

read less
Comments
Dislike Bookmark

Answered on 25/11/2016 IT Courses/MS Dynamics CRM

What is the difference between Online and On-Premises installation of Dynamics CRM and more important... read more
What is the difference between Online and On-Premises installation of Dynamics CRM and more important what is the pros and cons of the same? read less

Sumit Gupta

MS Dynamics Trainer

Hi Shyam, It's an apt question - lets explain it through a scenario -- Let's say there is an organisation which is a small having a small team and is least interested in investing the infrastructure required for the setting up the solution - Dynamics CRM - in that case, they simply opt in for a package... read more
Hi Shyam, It's an apt question - lets explain it through a scenario -- Let's say there is an organisation which is a small having a small team and is least interested in investing the infrastructure required for the setting up the solution - Dynamics CRM - in that case, they simply opt in for a package of office 365 along with the needed number of licenses and this all set up is managed by Microsoft simply its something like "Software as a Service" and the best part about the same is it's being hosted over Azure Cloud. So everything managed by the professionals, you have the access of the same through internet both in the organisation and out side the organisation. But now lets take up another scenario where in there is an organisation who have all the required setup and things and wants to play around a lot of database things can say they want a confined access only in the organisation or lets say they needed to integrate a lot of applications so the opt for the On-Premise installation and if they want to offer the access globally over internet then the same has to be upgrade with IFD installation. Moreover - Microsoft is giving more emphasis over On-Line versions due to its ease of availability to get integrated with Office 365 and similar features. read less
Answers 4 Comments
Dislike Bookmark

Answered on 10/10/2016 IT Courses/Microsoft Training/Microsoft Dynamics Axapta IT Courses/MS Dynamics CRM

What is the difference between MS Dynamics, CRM and AX?

Anand Khadse

Experience Dynamics CRM Tutor

Microsoft provides a range of products under a category called as MS Dymanic's Product stack. Product's under this category are Microsoft Dynamics ERP, Microsoft Dynamics AX, Microsoft Dynamics GP, Microsoft Dynamics NAV, Microsoft Dynamics SL, Microsoft Dynamics C5 and Microsoft Dynamics CRM Microsoft... read more
Microsoft provides a range of products under a category called as MS Dymanic's Product stack. Product's under this category are Microsoft Dynamics ERP, Microsoft Dynamics AX, Microsoft Dynamics GP, Microsoft Dynamics NAV, Microsoft Dynamics SL, Microsoft Dynamics C5 and Microsoft Dynamics CRM Microsoft Dynamics CRM is a customer relationship management application, sold separately from Microsoft, that provides sales, service, and marketing capabilities. Microsoft sells Microsoft Dynamics CRM either as on-premises software or as a software-as-a-service offering called "Microsoft Dynamics CRM Online". Microsoft Dynamics ERP comprises a group of enterprise-resource-planning products primarily geared toward midsize organizations with simple corporate structures and low-to-moderately complex production models. read less
Answers 2 Comments
Dislike Bookmark

Looking for MS Dynamics CRM Training

Find best MS Dynamics CRM Training in your locality on UrbanPro.

FIND NOW

Answered on 10/10/2016 IT Courses/Microsoft Training/Microsoft Dynamics Axapta IT Courses/MS Dynamics CRM

What is the difference between MS Dynamics, CRM and AX?

Anand Khadse

Experience Dynamics CRM Tutor

Microsoft provides a range of products under a category called as MS Dymanic's Product stack. Product's under this category are Microsoft Dynamics ERP, Microsoft Dynamics AX, Microsoft Dynamics GP, Microsoft Dynamics NAV, Microsoft Dynamics SL, Microsoft Dynamics C5 and Microsoft Dynamics CRM Microsoft... read more
Microsoft provides a range of products under a category called as MS Dymanic's Product stack. Product's under this category are Microsoft Dynamics ERP, Microsoft Dynamics AX, Microsoft Dynamics GP, Microsoft Dynamics NAV, Microsoft Dynamics SL, Microsoft Dynamics C5 and Microsoft Dynamics CRM Microsoft Dynamics CRM is a customer relationship management application, sold separately from Microsoft, that provides sales, service, and marketing capabilities. Microsoft sells Microsoft Dynamics CRM either as on-premises software or as a software-as-a-service offering called "Microsoft Dynamics CRM Online". Microsoft Dynamics ERP comprises a group of enterprise-resource-planning products primarily geared toward midsize organizations with simple corporate structures and low-to-moderately complex production models. read less
Answers 2 Comments
Dislike Bookmark

Lesson Posted on 29/09/2016 IT Courses/MS CRM IT Courses/MS Dynamics CRM

CREATE a record using Web API, MS CRM 2016

Ravitheja J

* Strong Experience of around 5+ years on Microsoft Dynamics CRM, with Good Knowledge and Exposure on...

Here is a link to my blog post with an example of using Web API to create a record: https://mscrmcodesamples.wordpress.com/2016/04/11/create-record-using-web-api-ms-crm-2016/
Comments 1
Dislike Bookmark

Lesson Posted on 27/09/2016 IT Courses/MS Dynamics CRM

SLA in Microsoft Dynamics CRM 2016

Anand Khadse

I am an experienced Microsoft Dynamics CRM trainer with rich experience of 6 years in conducting training's...

Enhanced SLA Extended for Other Entities in Dynamics CRM 2016 Update 1 Introduction: In earlier versions of CRM, the SLA feature was only applied to the Case Entity. Now, with Dynamics CRM 2016 Update 1 release, you can enable Enhanced SLA for other entities as well. Below are the entities for which... read more

Enhanced SLA Extended for Other Entities in Dynamics CRM 2016 Update 1

Introduction:

In earlier versions of CRM, the SLA feature was only applied to the Case Entity. Now, with Dynamics CRM 2016 Update 1 release, you can enable Enhanced SLA for other entities as well.

Below are the entities for which you can enable SLA in CRM:

  • Contact, Account, Lead, Opportunity, Quote, Order, Invoice.
  • Custom Entities and Custom Activities.
  • Also for some activity entities as email, phone, and appointment except for the recurring appointment.

NOTE:  You can apply only enhanced  SLAs for  other  entities. Standard  SLAs are applied for Case Entity only.

For enabling this enhanced SLA feature in CRM for the above entities or any Custom Entity, you will need to follow below mentioned steps:

1.  Navigate to Settings → Customizations

2.  If you want to enable SLA for Opportunity entity then in the left pane, you can select Opportunity from the list of entities.

3.  Then under the General tab, in the Communication & Collaboration section, select the “Enable for SLA” checkbox.

4.  After checkbox is checked, click to Save and Publish. Below is the screenshot for reference:

NOTE:  Once  you  have  enabled  this  feature  for  the  entity,  you  cannot  disable  it again.

 

Below are the Steps for Creating SLA for the Opportunity Entity:

Step  1: Navigate to Settings  → Service Management  → Service  Level  Agreements. On the SLA page, click on “New” button in the ribbon.

After this, you will be able to see Create  SLA pop-up.

In the above pop-up, you will be able to see an Entity option value where all the entities will be displayed in the list, which you have enabled for SLA at entity level.

Now, type the SLA Name and select Opportunity entity, click “OK”.

Step  2: And then you will be directed to the new SLA window where you can set the criteria, as you want to apply for the SLA.

As you can see from the above screenshot, Entity will be set as “Opportunity” by default and SLA Type will be set as “Enhanced”. Select the desired criteria for Opportunity SLA and then click to save.

Note:  Only  when  you  select  Case  entity,  you  will  be  asked  with  two options  to select the SLA Type that is either “Standard” or “Enhanced”.

Step  3: After this you will need to create the SLA  Item to set the success and failure conditions for SLA. So further, just scroll down the SLA form to set the SLA  Details.

Click to + Add SLA item button. Then a new window will be displayed to set the success and failure criteria.

Now, when you try to set the criteria in the SLA Item Window, you will face a situation where you will be stuck, as you will not find any options predefined for SLA KPI Instances in the CRM for Opportunity entity.

Hence, if we try to save this “SLA Item”, by keeping this field blank, it will not allow you to do so.

So the Solution for this is to first manually create and define the SLA KPI Instances for Opportunity Entity in CRM.

Step 4: You can follow the below mentioned procedure for adding the “SLA KPI Instance” field on the Opportunity:

  1. Navigate to Settings
  2. In the left pane, select Opportunity Entity, click on the Fields.
  3. Create a new lookup field with Name – “First Response In” and Target Record Type as “SLA KPI Instance” for the Opportunity entity.
  4. After creating this field, 1: N relationship will be automatically created between SLA KPI Instances and Opportunity. Save and Publish these Customizations.
  5. After this, open Form Editor of the Opportunity and add this “First Response In” field on the Opportunity Form.
  6. With this field, you will need to insert a “Quick View Form” in the Form Editor, with the lookup field source of “First  Response  In” and select the Quick View form of “First  Response  SLA” for the opportunity form so that you can check the Timer Status of the SLA applied to the record.

So, this “Quick View form” will automatically add a Timer on the form to track the Time of SLA for the Opportunity records in CRM. e.g.: If your SLA Time is elapsed then you will be able to see the timer.

Also you can add this field and Quick view form in a new “Enhanced  SLA Results” section on the opportunity form and click “OK” and then Save & Publish Opportunity.

Important Points to be highlighted:  

  1. You  will  have  to  perform  this  action  of  creating  lookup  field  with  Target Record  Type  as  “SLA  KPI  Instance”  for  all  the Entities,  which  you  have enabled for SLA.
  2. The  Timer  will  be  visible  only  when  your  SLA  will  be  applied  to  the Opportunity record. 

Step  5: Now once you have performed the above actions, you will be able to select this SLA KPI Option value on the SLA Item for Opportunity.

Now you can define the Success and Failure criteria for applying SLA on the Opportunity entity.

Step  6: Suppose, if you want to track the “Opportunities  which  are  Won  within  5 mins”, then you can set the Success criteria as Opportunity Status = “WON” and in the SLA  Item  Failure  time you can set time as “5  minutes”.

Also, if you want then you can set the Success and Failure Actions to perform on SLA on the SLA Item Window and then click to Save & Close button.

Then further click on “Activate” and then click to “SET AS Default” button on the SLA so that this SLA will be automatically triggered once the Opportunity record is created.

Now your SLA will be successfully created for Opportunity entity and you can check the SLA status on the Opportunity records.

Step 7: To check the SLA status on Opportunity, create an Opportunity record and fill the required Information and click on save.

Once the opportunity record is created, SLA will be triggered and the SLA  KPI Instance record will be created in the CRM and set in the “First Response In” field on the Opportunity.

As you can see from the above screenshot, on creation of your Opportunity record, the SLA will be triggered and applied to the Opportunity.

Also, you can see the Time remaining in the “First  Response  in” field on the added Quick view form.

Step 8: Once your Opportunity is created, you can check the Success or Failure of SLA as per the criteria you set in the SLA.

i.e.: If the “Opportunity is WON in 5 minutes”, then on refreshing the page, you will be able to see.

Else If the “Opportunity is not WON in 5 minutes”, then on refreshing the page, you will be able to see.

Hence, you will be able to see the SLA  KPI  Instance record created in CRM regarding the “Opportunity”as shown in below screenshot.

 

Conclusion:

This blog explains about the enhanced SLA extended for other entities in CRM 2016 update 

Now with this SLA extended feature for other entities, it will become easy for you to track if the  users in your organisation are responding your customers within the specific time or not

read less
Comments
Dislike Bookmark

Looking for MS Dynamics CRM Training

Find best MS Dynamics CRM Training in your locality on UrbanPro.

FIND NOW

Answered on 26/08/2016 IT Courses/MS Dynamics CRM

ms dynamics crm

Prashi N.

Trainer

Hi Prem , R u looking for CRM training ? please elaborate your question.
Answers 1 Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best MS Dynamics CRM Training in India. Post Your Requirement today and get connected.

Top Contributors

Connect with Expert Tutors & Institutes for MS Dynamics CRM

x

Ask a Question

Please enter your Question

Please select a Tag