XRM Speed Builder for MS CRM

XRM speedy Tool allows migrating existing applications to CRM in a quick way by providing the following :
- Creates custom entities from SQL Server database tables
- Creates attributes from fields from database table fields
- Puts fields on forms.
http://xrmspeedy.codeplex.com/
Thanks to Jason Lattimer for this perfect tool.

Perform left outer join using Fetch XML in MS CRM

This illustration shows you how to use FetchXML queries to perform left outer join.

The following query shows how to query accounts having no leads

<fetch mapping='logical'>
<entity name='account'>
<attribute name='name'/>
<link-entity name='lead' from='leadid' to='originatingleadid' link-type='outer'/>
<filter operator='and'>
<condition entityname='lead' attribute='leadid' operator='null'/>
</filter>
</entity>
</fetch>

Trigger plugin on Action Execution in Dynamics CRM

Hi ,

I am going  to show in the following steps how to trigger plugin on Action execution in CRM

Steps

1) Create Action

CreateAction

2) Register plugin

RegisterPlugin

3) Call Action

The following code will show how to call the action using C#

OrganizationRequest callActionRequest = new OrganizationRequest("qdrn_setcustomervip");

callActionRequest["Target"] = new EntityReference("contact", {GUID});

OrganizationResponse callActionResponse = service.Execute(callActionRequest);

How To : Set A Fields On A Form Required Or Recommended Using Java Script in CRM

// Required

Xrm.Page.getAttribute("FieldSchemaName").setRequiredLevel("required");

//Recommended

Xrm.Page.getAttribute("FieldSchemaName").setRequiredLevel("recommended");

// None

Xrm.Page.getAttribute("FieldSchemaName").setRequiredLevel("none");

Invoke Rollup Fields Calculation programatically in CRM

Hi,

Rollup field calculation is done by an async CRM Workflow , however in many scenario you may want to perform run time calculation , the following code illustrate how to invoke the calculation prgroamtically.

CalculateRollupFieldRequest rollupRequest=

new CalculateRollupFieldRequest { Target = new EntityReference("new_customentity", entityId), FieldName = "new_rollupfield"};

CalculateRollupFieldResponse response =(CalculateRollupFieldResponse)service.Execute(rollupRequest);

MS CRM - What is the "IsDirty" Method ?

Hi,

The "IsDirty()" Method returns a Boolean value indicating if there are unsaved changes to  attributes values.

Code:

//To Check if the entity is dirty
var ismodified=Xrm.Page.data.entity.getIsDirty();

//To Get Dirty Fields
var attributes = Xrm.Page.data.entity.attributes.get() ;
for (var i in attributes)
{
var attribute = attributes[i];
if (attribute.getIsDirty())
alert("attribute dirty: " + attribute.getName());
}