Monday, 10 February 2014

How to form dynamic hyperlink URL for email Template in CRM 2011

Problem:  How to form dynamic URL in email Template.

Solution:

I had a situation in which my workflow had to kick off emails to the sales Rep and those email contain the URL to the record. Now I had to form that URL at run-time grabbing the Guid of the record.

You can achieve this by two way either you can use the "Insert hyperlink" option available in design template as shown below or form URL on your own discuss later in this article:





Once the hyperlink window is opened you can fill the name you want to show and select the “Record URL(Dynamic)” as value and hit ok.






So now when the email is generated you get the link to opportunity record.

But if you want to form the URL dynamically say to open other record or open outlook or link to some another page etc. then you need to form hyperlink on your own.

For example I want to set URL for another record not opportunity from this email template. To achieve this task we will grab the tags that are generated by "Insert hyperlink" option and then edit the values inside it according to our requirements.

<hyperlink>
    <name>
    </name>
    <value>
    </value>
</hyperlink>

This is the basic tags now we will fill the data inside this tag as per our requirements.
<hyperlink>
    <name> URL to Another entity</name>
    <value>https://servername/OrganizationName/userdefined/edit.aspx?etc=10033&id={Guid Of Parent Entity(GetGuidOfParentEntity)}</value>
</hyperlink>

Here I am grabbing the guid of Parent entity by custom workflow utility. 10033 is the entity code for the entity whose record I want to pull out. You can replace servername and organizationName according to your structure.

Thanks,

Friday, 7 February 2014

How to grab the entity code for specific entities.

Problem:  How to grab the entity code for specific entities.

Solution:


Sometimes you need entity code in CRM 2011 to form the URL or for any other purpose. For that you can write following query to your SQL Server to grab the entity code given the entity name:

select ObjectTypeCode,LogicalName
from EntityLogicalView
where LogicalName like 'yourEntityName%'
  
EntityLogicalView table stores all entity related information.


Thanks,

CRM 2011 graph display error message: Maximum Record Limit is exceeded

Problem:  when chart is displayed in CRM 2011 we get an error message.

Solution:
Sometimes when chart get displayed in CRM 2011 you get error message indicating that “Maximum record limit is exceeded. Reduce the number of records."

This error is because in SQL Server there is max record limit set for charts to display data. This means, query that you placed for charts is grabbing more data than max record limit and so you end up getting this error.

To resolve this issue either you need to change your query to grab lesser data or if that is not possible you need to increase the max record limit in SQL Server.

If you want to increase the max record limit in SQL Server than you need to update Deployment Properties table in MSCRM_CONFIG database.

you can execute following query:

update MSCRM_CONFIG.dbo.DeploymentProperties
set IntColumn = 10000000
where ColumnName = 'AggregateQueryRecordLimit'

  
Thanks,

Monday, 3 February 2014

Get Started Pane showing up error message.

Problem:  Get Started Pane in CRM 2011 showing up error message.

Solution:
Sometimes when you update the system or change the port you can end up with error getting displayed in the “Get started Pane” in CRM. For example you changed the port i.e. moved from http to https.

In you SQL Server there is database name “MSCRM_CONFIG” that contains ConfigSettings table. This table has field named “HelpServerUrl”. This field might not be updated or contain correct URL and that might be the cause of error in your Get Started Pane.

Update the value in “HelpServerUrl” field to correct URL and port. I mean if you moved from http to https then you need to give the correct webserver URL and port.

After changing URL perform IIS reset and you should get rid of error.

Thanks,