CRM Blog

April 2008 - Posts

Leveraging CRM as part of a solution to Page Technical Support in your Company
by Zahara Hirani 04.14.08

Comments    No Comments

Recently at a client we had the challenge of developing a solution that would alert technical support when a case that was updated and needed tech support to look into the issue.

At first we thought workflows, but then realized we needed to create a custom entity that would store all of the paging information for the tech support to look at. We also needed to page different lists of people based on the escalation level, escalation frequency, day-night sift as well as the time the tech support were being paged. Oh wait I’m not done – we also needed to store all the levels reached and paging times etc in our custom entity and stop paging if tech support was already looking into the issue. We also had to have the correct lists paged based on what department of the firm the account/case belonged to.

We started off by creating a custom entity that would store the different tech support people.
We then created another entity to store the different escalation levels the tech support people belonged to as well as the day-night shift information.
We then created another custom entity to store the different escalation groups and the department those groups to would be responsible for (more like a profile).
We needed to link the escalation profiles to the account/case since each belonged to different departments as we could have multiple profiles within a department. For this, we created another custom entity that stored the account, the department and the profile.
The last custom entity we created was  one that would stored the information regarding the case, account, escalation groups and time when the actual page was sent.

Next we created a create/update post callout method for  the case entity that would validate if the user wanted to page tech support. In the callout we had to check if a page had already been sent and if not, not to create a new request. If the page had not been sent, the callout created the custom entity to store all the information regarding the case, account and escalations information like escalation lists, timing etc.

Lastly, we created a windows service that looked for the custom entity that had all the paging information and checked if the page had been sent or needed to be sent as well as if it was already being worked on by the tech support person. If the escalation time was reached, the service would check who was on the next escalation level as well as the day-night shift time and programmatically send an email(page) to the correct list of people and update the custom entity to reflect the most recent page.

Once the tech support person recevies the email and gets ready to work on the case, the tech support person accepts the request and the custom entity gets updated so that no more pages are sent.

Displaying a Report in an IFrame of a CRM Entity Form
by Zahara Hirani 04.11.08

Comments    No Comments

Recently Danny Varghese wrote a blog on displaying related entities in an IFrame of a CRM form. Let’s give it a little twist – Displaying a Report in an IFrame of a CRM Form.

For this example, we created a custom report that takes in the Account Id as a parameter and displays the campaign activities associated to that Account.  Now let’s add the report to display on an account and show all campaign activities that have taken place with that account.

For this,

Open CRM and navigate to the Settings Module.
Now navigate to Customizations and select Customize Entities.
Select the Account entity for edit and navigate to the Forms and Views.
Select the Form for edit.
Add a Tab to the Account called ‘Campaign Activity’.
Add a section in that tab called ‘Campaign Activity Report’ and add an IFrame to the section.
For the URL of the IFrame, enter ‘about:blank’.
We will now add logic in the form OnLoad event that will create the report URL and append the Account Id for the report to use to display the campaign activities.

//Get Account Id and remove the {} from the start and end of the guid
var accountId = crmFormSubmit.crmFormSubmitId.value;
accountId = accountId.substring(1, accountId.length -1)

//Get Reporting URL
var url = 'http://localhost:5555/ReportServer?%2fCrowe+Chizek_MSCRM%
2fAccount+Campaign+Activity&rs:Command=Render&rs:Format=HTML4.0&
rc:Toolbar=false&rc:Parameters=false&AccountId=' + accountId;

document.getElementById('IFRAME_CampaignActivity').src = url;

In the above code you will notice, we had to remove the ‘{}’ from the account id the Form returns. The easiest way to get the report URL is to open the report using the report server.

For this,

Navigate to the reporting services report server (e.g. http://localhost/reportserver)
Now Navigate to the CRM Reports Folder. (e.g. Crowe_Chizek_MSCRM)
Now navigate to the custom report you created. (e.g. Account Campaign Report in our scenario).

Since we want the report in an IFrame, we do not want the report viewer toolbar and parameters to show. Hence the ‘rc:Toolbar=false&rc:Parameters=false”. Since we want the report to render in HTML 4.0, we can specify the format to render the report in by specifying ‘rs:Format=HTML4.0’. Last but not the least we add the Account Id to the querystring so that the report can pick up the Account Id from the querystring and use it to return only campaign activities associated to that account.

Now save and close the form and publish the entity.

Navigate to an account that has campaign activities and you should see the new tab and report render in the IFrame.

Filed under: