Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Resolve Old Open Cases

Posted on by Microsoft Employee

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

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

    Thank youuu  prateek it worked

  • Community Member Profile Picture
    Community Member Microsoft Employee 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#.

  • Lema Salamov Profile Picture
    Lema Salamov 440 on at
    RE: Resolve Old Open Cases

    Hello,

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

  • Verified answer
    prt33k Profile Picture
    prt33k 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);
    }
  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans