Customer Portal CRM 2011 on premise - cannot sort cases by descending date

Answered Customer Portal CRM 2011 on premise - cannot sort cases by descending date

  • Freitag, 15. Juni 2012 15:53
     
     

    Hi,

    I can't sort the cases by descending dates ... I have modified the view "Cases Web View" to sort by dates et customer... but it changes nothing in Customer portal !

    Thanks for the help

Alle Antworten

  • Donnerstag, 2. August 2012 18:32
     
     Beantwortet

    I've recently had the same problem.  It doesn't appear to pull sorting options in the code, only the columns.

    However, I did find a work around.  Using Visual Studio, I modified CaseAccess.cs and added a orderby into GetCasesByCustomer section.

                    orderby c.GetAttributeValue<Guid?>("createdon") descending

    • Als Antwort markiert Stephane_CRM Freitag, 3. August 2012 07:17
    •  
  • Freitag, 3. August 2012 07:17
     
     Beantwortet

    Thanks for the answer...

    What I did to sort cases, is to modify the request to display the cases via Visual Studio in ViewCases.aspx.cs : 

    var casesByStatus = string.Equals(status, "En cours", StringComparison.InvariantCulture)
                    ? cases.Where(c => c.StateCode == (int)Enums.IncidentState.Active).OrderByDescending(c => c.CreatedOn)
                    : cases.Where(c => c.StateCode != (int)Enums.IncidentState.Active).OrderByDescending(c => c.CreatedOn);