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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Incident cannot be closed using CloseIncidentRequest

(0) ShareShare
ReportReport
Posted on by 40

Hi Experts,

I need one help. I am trying to close case using C# code.

Code:

        public static void CloseCase(IOrganizationService orgService, EntityReference incidentRef)
        {
            IncidentResolution incidentResolution = new IncidentResolution();
            incidentResolution.IncidentId = incidentRef;
            incidentResolution.Subject = "Sagar Close";
            CloseIncidentRequest closeIncidentRequest = new CloseIncidentRequest()
            {
                IncidentResolution = incidentResolution,
                //// Closed
                Status = new OptionSetValue(100000004)
            };
            CloseIncidentResponse response = (CloseIncidentResponse)orgService.Execute(closeIncidentRequest);
        }

Every request is getting failed. Error says that "This case has already been resolved. Close and reopen the case record to see the updates."

I checked on CRM UI. That Case is still open.

And 100000004 is for status "Closed" which is for Resolved Case State.

Am I missing anything here ?

Thank you in advance.

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    Are the case records currently open ? One reason for this error is if the case is already resolved (and maybe if it is cancelled).

    The other thing to check is that the status value you're setting (100000004) is associated with the Completed statecode

  • Nithya Gopinath Profile Picture
    17,078 on at

    Hi Sagar,

    Please see the link below.

    missdynamicscrm.blogspot.in/.../capturing-and-storing-case-resolution-case-entity-CRM.html

  • Sagar2016 Profile Picture
    40 on at

    Case is open.

    100000004 is for status "Closed" which is for Resolved State.

  • Sagar2016 Profile Picture
    40 on at

    Hi Gopinath,

    Yours given link is not related to my problem.

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    Hi Sagar,

     do you have any real-time workflows or sync plugins registered on the case entity? If yes, they might be trying to update something once the case has been closed..

     Actually, did you try closing exactly the same case manually using exactly the same resolution status? Did it work?

  • BadrinathB Profile Picture
    970 on at

    Instead of the below line

    CloseIncidentResponse response = (CloseIncidentResponse)orgService.Execute(closeIncidentRequest);

    just try

    orgService.Execute(closeIncidentRequest);

    This should work.

  • Suggested answer
    Sagar2016 Profile Picture
    40 on at

    Hi Alex Shlega,

    Thanks for the hint. Yes there is one workflow which was making update on case.

    Issue is resolved.

  • Community Member Profile Picture
    on at

    how did you fix it?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans