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)

Resolving a Case

(0) ShareShare
ReportReport
Posted on by 170

Hi all..I have a small requirement.We have a custom button called Resolve. On Click of that case has to be Resolved. I have Written a custom code for it.

So on click of the button case is getting resolved. But the problem it is getting reflected only after form Refresh. Please give your suggestions. Below is the code i have used for resolving.

Entity caseResolution = new Entity("incidentresolution");



caseResolution["incidentid"] = new EntityReference("incident", caseId);

caseResolution["subject"] = "Case resolved!";

CloseIncidentRequest close = new CloseIncidentRequest();

close.IncidentResolution = caseResolution;

close.RequestName = "CloseIncident";

close.Status = new OptionSetValue(5);

CloseIncidentResponse closeCase = (CloseIncidentResponse)organizationService.Execute(close);

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Muthuram144312,

    How are you calling this code from your button. You won't be able to refeesh from server side code, you need to have some JavaScript ode to triter this is done to referesh the page.

    Below is the JavaScript you can use-

    msdn.microsoft.com/.../dn481607.aspx;MSPPError=-2147217396#BKMK_refresh

    Hope this helps.

  • Suggested answer
    chauhanhardik Profile Picture
    687 on at

    Hi Muthuraman,

    You can refresh parent page(Case page) on close event of the pop-up window(case resolve page) by some javascript code which trigger the same action to refresh the parent page on closing of pop-up window.

    Thanks,

    Hardik Chauhan

  • Suggested answer
    ARIFNIIT Profile Picture
    1,391 on at

    Create a custom Action and write this case resolve code into this action. Call this action using JavaScript. when you will get response from action in javaScript refresh your form data using Xrm.Page.data.refresh()  

  • Suggested answer
    tw0sh3ds Profile Picture
    5,600 on at

    Why don't you refresh your form using JS?

    msdn.microsoft.com/.../dn481607.aspx

    There are many options here, you must be more specific what exactly does your button, you only posted some fragment of a plugin, not the whole solution.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Muthuraman,

    proceed as follow:

    1) add a new boolean attribute (we name it "new_resolve") to entity and form

    2) set your plugin to trigger CloseIncident only when new_resolve attribute is true

    3) when you click Resolve ribbon button, just set "new_resolve" as true ad save, so ...

    4) ... plugin execute CloseIncident event and the form reload, without any further action!

    Please let know if you solve

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Muthuraman,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight 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