web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Resolve Old Open Cases

(0) ShareShare
ReportReport
Posted on by

Hi 

I'm trying to resolve all old cases between two dates, 

I tried several online functions that resolve the cases but none with me is working. 

Any help please?

Thank you 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Resolve Old Open Cases

    Hello,

    You can do following:

    1. Create on-demand workflow for case entity that will change state of case to resolved.

    2. Run this in-demand workflow against cases you need to resolve.

  • Verified answer
    prt33k Profile Picture
    6,907 on at
    RE: Resolve Old Open Cases

    If it is just fetchxml then you can do a retrieve and then loop through the GUID and close the cases.

    foreach(Guid caseGuid in CaseGuidList)
    {
       Entity caseResolution = new Entity("incidentresolution");
       caseResolution.Attributes.Add("incidentid", new EntityReference("incident", caseGuid)));
       caseResolution.Attributes.Add("subject", "Reason for resolution.");
    
       CloseIncidentRequest req = new CloseIncidentRequest();
       req.IncidentResolution = caseResolution;
       req.RequestName = "CloseIncident";
       OptionSetValue o = new OptionSetValue(5);
       req.Status = o;
       CloseIncidentResponse resp = (CloseIncidentResponse)service.Execute(req);
    }
  • Lema Salamov Profile Picture
    440 on at
    RE: Resolve Old Open Cases

    Hello,

    So you aren't able to resolve them manually? Did I understand you correctly?

  • Community Member Profile Picture
    on at
    RE: Resolve Old Open Cases

    Hello Lema,

    No I can resolve them manually but the old opened cases are too many, so we need to resolve only the old cases using c#.

  • Community Member Profile Picture
    on at
    RE: Resolve Old Open Cases

    Thank youuu  prateek it worked

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans