Inogic is a hub of like minded professionals who believe in innovativeness and are committed to putting our time and efforts to R & D on Dynamics CRM.We endeavor to share some of our work on this blog by introducing Tips, Tricks and products from our labs.
Sunday, November 29, 2009
You receive an Sql Error when Importing Customizations
This error is often a result of data type mismatch between the attributes in the new customization file being imported and the entity attributes already defined in CRM. Say for example an entity has an attirbute of the type picklist in CRM. However the same attribute is now defined to be of the data type int in the new customization file that needs to be imported. CRM allows for onyl unique attribute names. Now since it already has an attribute of the same name but a different data type it cannot overwrite that attribute with the new data type defined in the customization file.
To fix the problem, you need to delete the existing attribute from CRM entity. Publish the entity customizations. Now try to re-import the customization file. It will import without any SQL errors.
Wednesday, November 18, 2009
Tips on using Mail Merge Functionality in Dynamics CRM
1. Mail Merge functionality has been added as a privilege and so only users with the necessary privileges would be allowed to perform a mail merge. Mail merge is also available through the Web interface.
2. When the Mail merge process opens the Microsoft Word window to allow for designing of the Template make sure of the following
a. Enable Macros
b. Make sure the CRM addin is enabled and you have to click on this for the CRM mail merge to begin.
3. Though Mail merge can be used from Web interface as well, having Outlook client installed brings up some additional features like ability to “Upload” the mail merge template directly to CRM.
4. There are two ways to upload Mail Merge templates to CRM, one being design the template using the “Create Mailmerge template” button in MS word.
Save the Template file in Microsoft Word XML format.
Attach this document to CRM.
If you had the CRM Outlook client installed and Outlook running, the Word Mail merge wizard would display the “Upload Template” option.
Choosing this would automatically upload the document to CRM.
5. Mail Merge functionality is available for only selected System entities like
· Quote
· Lead
· Opportunity
· Account
but all custom entities are available for selection for Mail Merge
6. Only for the Quote entity would you find the “Related Products” entity in the data fields selection window.
No other one-to-many relations of any entity would be available for mail merge. However all lookup attributes would have their related entities available for selection in the data fields.
7. To design a mail merge template that lists out all the exported entries in a single document instead of creating one document per exported line of data choose the Mail Merge type to be “Directory”.
After you insert the mail merge fields and click on preview, it would still display each record on a separate page. To check the results as a list in a document, complete the merge and export the merge to another document to see the entire list in a single document.
Wednesday, November 11, 2009
Issues with deleting a picklist option from a Picklist attribute
While checking out the picklist option sequencing in detail to explain it to our customer we found that CRM by default will always bring back the value of the deleted option.
Here we take an example of Contact record and “Lead Source” picklist attribute.
1. We have added a pick list value with name “Test” in lead source picklist.
2. Now we have selected the test option in a contact record.
3. Now we go ahead and delete the “Test” option from “Lead Source”..
4. If you go back to the contact record that had this value assigned to it, it would now have been reset to “Default Value”
Now unless you save this record, it would automatically get the next option that you add with the same “Value”.
Another point worth mentioning is that if you had deleted one of the picklist options and published the customizations, the next time you add a new option to this picklist it would bring back the value of the deleted option. The value is editable in CRM 4.0 so make sure you change this value unless you were adding this as a replacement to the earlier deleted option.
Now we have deleted the test and publish the entity.
In below screen shot we are adding a another picklist option “Test123”, it will bring up the same value as that of “Test” the deleted option.
Now even if we edit the value and set it to say 200002, any further options that you add do not increment automatically to use the next sequence number i.e 200003 but rather would still bring up 200000 as the value by default for every new option that you add hence forth.
I am not sure if this is a feature or a bug, but I would rather have preferred it remember the last sequence number assigned and increment it from there on.
Monday, October 26, 2009
How to Increase the Tab limit in CRM Forms
You can change the count specified in the _iMaxTabs to increase the count as shown in the below screenshot.
Note: This is an unsupported change and it could be overwritten if you install Rollups for CRM.
Sunday, October 18, 2009
Global Functions/Variables available in Dynamics CRM
There are various global functions which provide information about the client system.
IsOnline: This will return if the form has been opened from an Online or Offline system. This could be helpful if you would want a particular feature to be made available in a specific mode only.
Example:
if (IsOnline())
{
alert("You are working online");
}
These above are available through scripting. If you would like to check this in your server side app, you need to add reference to the Microsoft.Crm.Outlook.Sdk assembly. The assembly contains a class named CrmOutlookService that can be used to check the status of the Outlook client.
IsCrmClientLoaded: This will return if the Microsoft Dynamics CRM for Outlook client has been loaded by Microsoft Outlook
IsCrmClientOffline: This will return true if Microsoft Dynamics CRM for Outlook with offline Access is currently in offline mode
GenerateAuthenticationHeader:
When you call webservice through scripting, you need to pass the authentication information along with the SOAP header. This function returns the appropriate Microsoft Dynamics CRM authentication header based on each deployment type: on-premise, Internet-facing deployment (IFD), or Microsoft Dynamics CRM Online.
Example:
var soapBody = "<soap:Body>"+
"<Execute xmlns='http://schemas.microsoft.com/crm/2007/"+
"WebServices'>"+
"<Request xsi:type='WhoAmIRequest' />"+
"</Execute> </soap:Body>";
var soapXml = "<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'>";
soapXml += GenerateAuthenticationHeader();
soapXml += soapBody;
soapXml += "</soap:Envelope>";
PrependOrgName: The CRM URL by default adds the CRM Organization name when you browse CRM. It is important that if you are displaying a custom page in an IFRAME, the path to the page should also include the current Organization name. This function automatically determines the current organization name and adds it to generate the URL specific to the current organization.
Example:
var url = prependOrgName("/isv/app/myapp.aspx");
results: If you were logged into Contoso organization “/Contoso/isv/app/myapp.aspx”
Global Variables:
Some of the Global variables that can really come in handy are
1. SERVER_URL: This will return the base Server URL.
2. ORG_UNIQUE_NAME: This will return the unique text value of the organizations name. This is the same value to you also receive in custom forms if you set the PassParams to be true.