Friday, February 08, 2013 10:14 PM
Using Customer Portal with CRM 2011 Online and Windows Azure.
For our cases we store the Account name in the CustomerId field and the Contact name in a field called msa_partnercontactid.
I have modified CreateCase.aspx.cs to set these attributes appropriately and everything shows up fine when creating new cases through the portal.
I also modified ViewCases.aspx.cs by changing the line in the casesByCustomer variable from:
casesbyStatus.Where(c => c.CustomerId.Id == Contact.Id) ... etc
casesbyStatus.Where(c => c.msa_partnercontactid.Id == Contact.Id) ... etc
When I go to view any Active cases, they appear as they should and I only see the appropriate cases listed when I choose My, My Company, or All. However, when I switch from Active to Closed, while displaying either My or My Company it goes to my error.html page. It will display Closed cases for All just fine. I have confirmed that closed cases exist and the msa_partnercontactid is set correctly. I've tried adding clauses in to the code to check for if the msa_partnercontactid field is null or if casesByCustomer.Count() is null and it still directs me to the error page. And I've even tried using another field for the contact that is not custom, the field 'responsiblecontactid', and it still does it.
It seems like the cases are being chosen correctly, it is just when it has to display them that there is a problem. Is there something that changes when a case becomes "Closed" that would remove the msa_partnercontactid field or nullify it somehow?
Is there any kind of logging I can enable that might tell me any more info about what is happening?
Any help would be appreciated, thanks.
- Edited by Joseph Pockets Tuesday, February 12, 2013 4:05 PM