How to Set a lookup value using JavaScript?

//How to Set a lookup value using JavaScript? var lookup = new Array(); lookup[0] = new Object(); lookup[0].id = recorid; lookup[0].name = recordname; lookup[0].entityType = entityname; Xrm.Page.getAttribute("attributename").setValue(lookup); //Alternate method to set lookup value Xrm.Page.getAttribute("attributename").setValue([{ id: recorid, name: recordname, entityType: entityname}]); **For CRM 2011 Training, please check out our CRM Training page. Please share |Like in…

How to Hide a section in CRM 2011 using JavaScript?

//How to Show a section using JavaScript? Xrm.Page.ui.tabs.get(tabNumber).sections.get(sectionNumber).setVisible(true); //How to Hide a section using JavaScript? Xrm.Page.ui.tabs.get(tabNumber).sections.get(sectionNumber).setVisible(false); **For CRM 2011 Training, please check out our CRM Training page. Please share |Like in Facebook if you feel like this page is useful.

How to Debug JScript in Microsoft Dynamics CRM 2011?

//How to Debug JScript in Microsoft Dynamics CRM 2011? Debugging in Jscript code can be done by adding the debugger: keyword to the code. function DebugSample() {     alert("Pop Up Message Before Debugging");     // debugger keyword will trigger the debug     debugger;     alert("Pop Up Message After Debugging"); } Here is a detailed post…

How to Debug a Plugin in CRM 2011?

5 steps to Debug a plugin in CRM 2011 Step1. Register and deploy the plug-in assembly. If there is another copy of the assembly at the same location and you cannot overwrite that copy because it is locked by Microsoft Dynamics CRM, you must restart the service process that was executing the plug-in. Step2. Configure the…

Unable to upgrade the CRM 2011 Plugin/Custom workflow assembly?

Have you come across the following errors/scenarios while upgrading a plugin/custom workflow assembly? 1. Unable to upgrade the Plugin assebly 2. Unable to upgrade the Custom Workflow assembly Here is the reason: "You might have changed the Major and Minor version components in the assebly version in the dll file. In this case, the assembly…

How to send an Email using Email Template from CRM 2011 using C#

//This post demonstrates how to send an email using a template from CRM 2011 using C# code //There are 4 steps in achieving this: (a)      Create the 'From:' activity party for the email (b)     Create the 'To:' activity party for the email (c)    Create an e-mail message (d)    Create the request to send email //Namespace…

How to send an Email from CRM 2011 using C#

This post demonstrates how to send an email from CRM 2011 using C# code. There are 4 steps in achieving this: (a)    Create the 'From:' activity party for the email (b)    Create the 'To:' activity party for the email (c)    Create an e-mail message (d)    Create the request to send email   //Namespaces need to…

CRM 2011 Training Series – How to Schedule reports in CRM 2011?

 How to Schedule reports in CRM 2011? The Microsoft Dynamics CRM 2011 schedule report feature is used for creating report snapshots. There are a few reasons to use this report snapshot functionality: Send as a SQL Report Server email subscription Cache ‘point-in-time’ snapshots Use as the user-run report for especially long-running reports Select the report…

CRM 2011 Training Series – What is the difference between Append and Append To?

What is the difference between Append and Append To? Here’s an easy example to help remember the distinction between the Append and Append To Rights defined in CRM's Security Roles. Consider the situation when a user needs to set the Parent Customer field on the Contact. Beyond the obvious ‘write’ permission on the contact, they…

CRM 2011 Training Series – Differences between Workflows and plugins in CRM 2011

Differences between Workflows and plugins in CRM 2011 Criteria Use Plugin Use Workflow Use Dialog Needs custom logic to execute synchronously. Plugins support synchronous execution. NA Dialogs always execute synchronously. The logic needs to be executed while offline Only plugins are supported offline. NA NA Needs elevation of privileges (impersonation) In the plugin step, you…

CRM 2011 Training Series – How to create a custom button in CRM 2011?

How to create a custom button in CRM 2011? Here is a beautiful post on msdn on how to create custom button in CRM 2011. This walk through shows you how to create the following new custom Send to Other System button to the Collaborate group for the Account entity ribbons: Account entity form ribbonAccount…

CRM 2011 Training Series – What’s the difference between FetchXML and QueryExpression?

What’s the difference between FetchXML and QueryExpression? These are the two distinct ways that you can query CRM using CRM SDK to retrieve the required information. QueryExpression is the mostly commonly used way for querying information in CRM. Probably because it uses the object oriented style of coding and so you have distinct classes for…

CRM 2011 Training Series – How to use Secure and Non-Secure configuration in Plugin?

When you register a plugin step, there is a field where you can specify some configuration parameters for the plugin execution: Then in the Constructor of your plugin class you will get the configuration value which you can use later in the Execute method:   public abstract class BasePlugin : IPlugin { private string _secureConfig…