Category Archives: MS CRM 4.0

Get Max value using Javascript

 If you want to fetch Max value from CRM entity record using Javascript, you can use below code, remember to change entity and field name accordingly var authenticationHeader = GenerateAuthenticationHeader(); // Prepare the SOAP message. var xml = “<?xml version=’1.0′ encoding=’utf-8′?>”+ “<soap:Envelope xmlns:soap=’http://schemas.xmlsoap.org/soap/envelope/’”+ ” xmlns:xsi=’http://www.w3.org/2001/XMLSchema-instance’”+ ” xmlns:xsd=’http://www.w3.org/2001/XMLSchema’>”+ authenticationHeader+ “<soap:Body>”+ “<RetrieveMultiple xmlns=’http://schemas.microsoft.com/crm/2007/WebServices’>”+ “<query xmlns:q1=’http://schemas.microsoft.com/crm/2006/Query’”+ ” xsi:type=’q1:QueryExpression’>”+ “<q1:EntityName>EntityName</q1:EntityName>”+ //change entity name “<q1:ColumnSet… Read more »

Using CompoundUpdateRequest in Dynamics CRM 4.0

Sometime when we are integrating ms crm with another application we need to send CRM data to another application and also need to keep track if data is already sent or not. For example if you are sending sales order and sales order line items and you need to update sales order and line item after sending, you can use  compoundupdaterequest message to update… Read more »

Customization Import from CRM online to Onpremise

Today I tried to import my customization.xml from CRM online to onpremise and I got error  “Either the file could not be uploaded, or this is not a valid Customization file.” I was surprised. I tried to import the same file to my CRM online environment again and it imported successfully. So my first thought was to enable trace and check… Read more »

Close Activity based on Due Date using workflow

   I got one requirement from my client where we need to complete Email activity based on it’s Due date. so I have to check if current date is equal to email’s due date then close email activity. So I created a workflow to implement this. Here are the steps to create workflow 1.       Create new workflow select Entity… Read more »

Create Opportunity Relationship record

Sometime we need to create “Opportunity Relationship” record through code. We can use below code to create Opportunity relationship record. Basically we need to set three values while creating opportunity relationship record customerid, opportunityid and opportunityroleid. //I have used Dynamic entity to create opportunity relationship record DynamicEntity  _OpportunityRelationship = new DynamicEntity(); //Set entity name as “customeropportunityrole”           _OpportunityRelationship.Name = “customeropportunityrole”; //Create… Read more »

Run exe from MS CRM 4.0

Mahender   September 22, 2010   4 Comments on Run exe from MS CRM 4.0

If you are looking to run .exe from MS CRM 4.0, then you can do this easily. You can create a ISV button on MS CRM form and create on global function on formonload can call it in ISV button JS.. you can write below code to run .exe var _Object=new ActiveXObject( “WScript.Shell” ) ; _Object.Run(“C:\WINDOWS\system32\calc.exe” );  you can also pass… Read more »

Easy way to avoid Infinite loop in Update plugin

I have seen many developers facing issue of infinite loop while using update method inside update plugin. I know it could be requirement specific, to use update method inside update plugin. But sometime we can void infinite issue, there is no need of calling update method. You could play with inputparmeter propertybag. For example sometime we have requirement to calculate… Read more »

Attach onclick event with MS CRM CRM checkbox

As you know that we can set control formatting of bit field to use it as checkbox. But only changing formatting does not make it to behave like a checkbox because of onchange event. Let take an example for this, like we have one field “Calculate Value” and we want to calculate some value on the selection of this bit… Read more »