Thursday, March 20, 2014

Set Unresolved Email Id's in party List from Java Script

function setUnresolvedRecipient() {
    var unresolvedemail = ""

    if (unresolvedValue != null) {
        var obj = new Object(); //create the unresolved object = unresolvedemail;
        obj.category = 3; = unresolvedemail;
        obj.type = "9206";

        var toField = Xrm.Page.getAttribute("to");
        var toValue = toField.getValue();
        if (toValue != null) {
            toValue.push(obj); //if there are already other values, add to it
        else {
            toField.setValue([obj]); //if 'to' field is null, just override it
        unresolvedField.setValue(null); //wipe the field after adding it to the 'to' list

This will set the email "" in the To party list on the Email Activity

Tuesday, February 4, 2014

Mapping custom fields on the Opportunity product entity to the Quote product in Microsoft Dynamics CRM 2011

Click Below:
Mapping custom fields on the Opportunity product entity to the Quote product in Microsoft Dynamics CRM 2011:

For Online Navigate to
and search for the entity map record and replace the entitymapid


Wednesday, July 10, 2013

Retrieving N:N related records using fetchxml

Using the intermediate table in the fetch xml we can easily retreive the N:N records using fetch xml

Wednesday, May 15, 2013

Opportunity Graph/Dashboard

This opportunity dashboard shows me my top 10 opportunities and when i click on any of the single bubble it shows the drill down of the other opportunities of the same client. This graph is interactive which can be drilled into multiple levels and can be customized with fancy images and icons

In building this i have used 

1) Screen showing opp graph as dashboard

2) Main graph showing top opportunities

3) Drill down of the other opportunities of the current opportunities potential customer

Monday, March 25, 2013

CRM 2011 JS : Set Option Set Value By Text

 function SetOptionSetValueByText(optionsetAttribute, optionText)  
  var options = Xrm.Page.getAttribute(optionsetAttribute).getOptions();  
  for(i = 0; i < options.length; i++)  
  if (options[i].text == optionText)  

Function calling

Thursday, March 14, 2013

Pass end point configuration in plugin

when consuming the wcf service in side the plugin, pass the configuration inside the code when initializing the service

for example:

 samplewcfserviceclinet clinet = new samplewcfserviceclinet (GetBasicHttpBinding(),new endpointaddress("endpoint address"))  
 private static BasicHttpBinding GetBasicHttpBinding()  
       BasicHttpBinding myBinding = new BasicHttpBinding();  
       myBinding.Name = "Binding configuration Name";  
       myBinding.Security.Mode = BasicHttpSecurityMode.None;  
       myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;  
       myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Windows;  
       myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;  
       myBinding.SendTimeout = TimeSpan.FromMinutes(10);  
       myBinding.OpenTimeout = TimeSpan.FromMinutes(10);  
       myBinding.CloseTimeout = TimeSpan.FromMinutes(10);  
       myBinding.ReceiveTimeout = TimeSpan.FromMinutes(10);  
       XmlDictionaryReaderQuotas readerQuotas = new XmlDictionaryReaderQuotas();  
       readerQuotas.MaxArrayLength = int.MaxValue;  
       readerQuotas.MaxDepth = int.MaxValue;  
       readerQuotas.MaxStringContentLength = int.MaxValue;  
       readerQuotas.MaxBytesPerRead = int.MaxValue;  
       readerQuotas.MaxNameTableCharCount = int.MaxValue;  
       myBinding.ReaderQuotas = readerQuotas;  
       myBinding.MaxReceivedMessageSize = 2147483647;  
       myBinding.MaxBufferSize = 2147483647;  
       myBinding.MaxBufferPoolSize = 2147483647;  
       return myBinding;