Showing Order history for a customer

Feb 5, 2013 at 9:08 PM
I have been able to get CCA r2 running and have the ability to open the contact edit page after searching for a customer. Is there a way of adding a new tab that will show the sales orders that this customer has placed? I have tried finding the url to the view for sales orders but cannot get it to show in the tab.

Any suggestions would be greatly appreciated.
Feb 6, 2013 at 7:15 AM
<div>Hi, You have to create a hosted application of type Session based. For this don't check the box for &quot;Application is global&quot;. Now you can able to get this in a tab. Hope this helps.<br> </div> <div>On Wed, Feb 6, 2013 at 3:38 AM, jcsnow20 <span dir="ltr">&lt;<a href="mailto:notifications@codeplex.com" target="_blank">notifications@codeplex.com</a>&gt;</span> wrote:<br> <blockquote style="margin:0px 0px 0px 0.8ex; padding-left:1ex; border-left-color:rgb(204,204,204); border-left-width:1px; border-left-style:solid"> <div> <p>From: jcsnow20</p> <div>I have been able to get CCA r2 running and have the ability to open the contact edit page after searching for a customer. Is there a way of adding a new tab that will show the sales orders that this customer has placed? I have tried finding the url to the view for sales orders but cannot get it to show in the tab. Any suggestions would be greatly appreciated.</div> <div> <p>Read the <a href="http://crmcca.codeplex.com/discussions/432105#post996932" target="_blank"> full discussion online</a>.</p> <p>To add a post to this discussion, reply to this email (<a href="mailto:crmcca@discussions.codeplex.com?subject=[crmcca:432105]" target="_blank">crmcca@discussions.codeplex.com</a>)</p> <p>To start a new discussion for this project, email <a href="mailto:crmcca@discussions.codeplex.com" target="_blank"> crmcca@discussions.codeplex.com</a></p> <p>You are receiving this email because you subscribed to this discussion on CodePlex. You can <a href="https://crmcca.codeplex.com/subscriptions/thread/project/edit" target="_blank"> unsubscribe or change your settings</a> on codePlex.com.</p> <p>Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at <a href="http://codeplex.com" target="_blank">codeplex.com</a></p> </div> </div> </blockquote> </div> <br>
Feb 6, 2013 at 7:23 AM
Edited Feb 6, 2013 at 7:32 AM
hi jcsnow20,

Dont know if i understand you right: You want to have a Tab in your AgentDesktop which shows a CRM Form, right?

If you succeed in finding that url just configure a Non global WebHostedApplication.

Implement a Workflow Assembly which creates the URL for the users sales view ( maybe you need some data out of the users session context here, which is no problem using the HAT Automations in the Workflow Designer) and then navigate your WebHostedApplication to that url.

Bind that Workflow Assembly as Default Action to your WebHostedApplication and your done.

Every time a Customer Session is opened, the WebHostedApplication is created (and therefore appears as a tab) and your WorkflowAssembly is executed via the Default Action. The Website referenced by your created URL is than shown in that Tab.

i hope that points you in the right direction.
Feb 6, 2013 at 4:41 PM
Yesterday I was able to figure out how to create a tab to show the cases for a customer when the customer session starts. I tried doing the same thing for sales orders and am getting an error.


Microsoft CRM Error Report:
Error Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Error Details:
Exception of type 'System.Web.HttpUnhandledException' was thrown.

Full Stack:
[ArgumentNullException: Value cannot be null.
Parameter name: g]
at System.Guid..ctor(String g)
at Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.ConfigurePageHandler()
at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName)
at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



Other Message:

Error Number:

Source File:
Not available

Line Number:
Not available

Error Trace:


Date: 02-06-2013

Time: 10:16:15

Server: localhost


Request URL:

http://{server}/{Org}/userdefined/areas.aspx?id=fd3b8866-c64b-e211-975d-d067e54beabf&oType=2&security=852023&tabSet=areaSales

Microsoft CRM Unhandled Error Details:
Server Error in '/' Application.


Value cannot be null.
Parameter name: g
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: g

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: g]
System.Guid..ctor(String g) +12643366
Microsoft.Crm.Application.Components.PageHandlers.AreaPageHandler.ConfigurePageHandler() +125
Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName) +230
Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e) +259
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201


I am showing cases by setting the action url to : http://{server}/{Org}/userdefined/areas.aspx?oId=%CustomerID&oType=2&security=852023&tabSet=areaService

Any ideas on what this error could be?
Feb 6, 2013 at 5:00 PM
I found the error. I was using id instead of oid in the url and I needed to set the tabset=areaOrders.
Feb 6, 2013 at 8:44 PM
I now have the sales order for the current customer showing.
Is there any way to get the ribbon bar to show?

I am using the following url to get the sales orders to show: http://{server}/{Org}/userdefined/areas.aspx?oId=fd3b8866-c64b-e211-975d-d067e54beabf&oType=2&security=852023&tabSet=areaOrders
Feb 12, 2013 at 10:14 AM
jcsnow20 wrote:
I now have the sales order for the current customer showing.
Is there any way to get the ribbon bar to show?

I am using the following url to get the sales orders to show: http://{server}/{Org}/userdefined/areas.aspx?oId=fd3b8866-c64b-e211-975d-d067e54beabf&oType=2&security=852023&tabSet=areaOrders
Hi jcsnow20,

I am stuck at the same issue which you were facing and i have tried to follow the way you have done but i am not getting it.I also want to know the clear idea about this link __http://{server}/{Org}/userdefined/areas.aspx?__ .

I am also trying to show the detail of customer from a custom entity.