Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Resolution Plug-in issue case Entity

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am using the Dynamic 365 customer services App online. Today I have created first plugin and registered in sandbox instance for capture and store resolution on case entity using below article.

http://missdynamicscrm.blogspot.com/2015/02/capturing-and-storing-case-resolution-case-entity-CRM.html

But getting this error "an unexpected error occurred from isv code". Kindly suggest me for issue.

pastedimage1587930408116v1.png

Thank you 

vetrivel G

  • Community Member Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Andrew,

    Currently resolution is stored in timeline below image. 

    pastedimage1588152053861v1.png

    I need to store resolution custom field in case entity( e.g: resolution). like below picture. If it is possible share links 

    pastedimage1588152337878v2.png

    Thank you

    vetrivel G

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Resolution Plug-in issue case Entity

    1. After the change you need only build assembly and update it using Plugin Registration Tool.

    2. To move it to production I would recommend to use solutions - add plugin assembly/plugin steps to solution, export from dev, import to production.

    3. Not sure what you mean here.

  • Community Member Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Andrew,

    Please note, I;m new for CRM and learning and as well developing customer engagement. Now I can able to see resolution in case entity. thank you promote response, helped for this issue. I'm really appreciate time and effort.

    pastedimage1588148602590v1.png 

    Few more Question:

    1.If small code changes in plug in means every time can I unregistered plugin and register again CRM or any alternative way is there?

    2.Can perform same steps in into production instance?

    3. If any possible to display resolution in the resolved form on case entity?

    Once again  Thank you

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Resolution Plug-in issue case Entity

    Wrong entity and wrong message for step. It should be incident for entity and resolve for message.

    Don't get me wrong - I will not babysit you. I gave you all tools you need and it's up to you to figure out what is wrong.

  • Community Member Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Andrew,

    Now case is resolved in normal mode, Resolution not storied in case entity and debug mode couldn't find any errors. Below image is register plug in steps I followed

    pastedimage1588145497468v2.png

    Plug in Trace

    Profiler> Plug-in AppDomain Created
    Profiler> Parsed Profiler File Successfully.
    Profiler> Constructor Execution Started: 04/29/2020 20:49:54
    Profiler> Constructor Execution Completed Successfully (Duration = 0ms).
    Profiler> Profiler Execution Started: 04/29/2020 20:49:54
    Profiler> Profiler Execution Completed Successfully (Duration = 1ms).
    Profiler> Profiler AppDomain Unloaded.

    Thank you

    vetrivel G

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Resolution Plug-in issue case Entity

    Comment that line out. It just throws an exception without any reason.

  • Community Member Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Andrew

    I have tried to troubleshooted issue. Facing below exception issue.

    pastedimage1588143974754v1.png

    Now plug in working only debug mode. I can able to resolve case and it's storing resolution in case entity. But after uninstalled profiler in sandbox and plugin again not able to store resolution in the case entity.  Kindly suggest me you answer.

    Thank you

    vetrivel G

     

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Resolution Plug-in issue case Entity

    Your code throws an exception at the end. It will never work fine - throw new NotImplementedException();

    And as I mentioned before - troubleshoot the plugin to find the answer why it doesn't work.

  • Community Member Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Andrew,

     I have tired below code it's through same error. No changes. any alternative way is there.

    Plugin Code

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.ServiceModel;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Query;

    namespace CaseResolution
    {
    public class Resolution : IPlugin

    {
    public void Execute(IServiceProvider serviceProvider)
    {
    // Obtain the execution context from the service provider.
    IPluginExecutionContext context = (IPluginExecutionContext)
    serviceProvider.GetService(typeof(IPluginExecutionContext));

    if (context.InputParameters.Contains("IncidentResolution"))
    {
    Entity incidentResolution = (Entity)context.InputParameters["IncidentResolution"];
    Guid relatedIncidentGuid = ((EntityReference)incidentResolution.Attributes["incidentid"]).Id;
    DateTime actualEnd = DateTime.Now;
    if (incidentResolution.Contains("actualend"))
    {
    actualEnd = (DateTime)incidentResolution.Attributes["actualend"];
    }
    // Obtain the organization service reference.
    IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

    // Get created on of incident

    Entity retrievedIncident = service.Retrieve("incident", relatedIncidentGuid, new ColumnSet(true));
    DateTime createdOn = (DateTime)retrievedIncident.Attributes["createdon"];

    TimeSpan totalTimeSpent = actualEnd.Subtract(createdOn);

    Entity incident = new Entity("incident");
    incident.Id = relatedIncidentGuid;
    incident.Attributes["new_duration"] = totalTimeSpent.TotalMinutes;
    service.Update(incident);

    }


    throw new NotImplementedException();
    }
    }
    }

    Error Code

    pastedimage1588141270866v1.png

    Thank you

    vetrivel G

  • Suggested answer
    ZeeshanGhause Profile Picture
    on at
    RE: Resolution Plug-in issue case Entity

    Hi Partner!

    Case is already resolved (then it become read only)and you are trying to update that resolved case so it is not supported okay.

    First of all you have to reactivate that case and then you can update that case and after that resolve/close that case that's it

    Follow this simple steps

    community.dynamics.com/.../updating-resolved-cases-in-dynamics-365

    Regards,

    Zeeshan  

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans