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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Prefill "Resolution" field with a solutionID from the Case on Close

(0) ShareShare
ReportReport
Posted on by 3,460

Whenever you close a Case, a new windows pops up and you have to fill in the Resolution for that case.

I have a custom "Solution ID" on Case, and would like to prefill the Resolution field with the value of Solution ID.

How can i do this ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    It's not possible to customize the popup.

    You can create your own popup to close a Case (not suggested) or you can create a plugin that will add automatically this field inside the resolution after the case is resolved.

  • Letoir Profile Picture
    3,460 on at

    How do i get access to this field, since its not in the Target, Post- and Pre-Image ?

  • Guido Preite Profile Picture
    54,086 Moderator on at

    which plugin message you are checking?

  • Letoir Profile Picture
    3,460 on at

    i didnt write my code yet, its a question that came to me before writing the plugin.

    Because if it was available on the entity, i could maybe use a workflow, but i didnt find it in the fields sector.

  • Suggested answer
    Parvez Ghumra Profile Picture
    7 on at

    I think the message you need to tap in to is the CloseIncidentRequest message. See here: msdn.microsoft.com/.../microsoft.crm.sdk.messages.closeincidentrequest.aspx

    This results in an incidentresolution entity record. See here: msdn.microsoft.com/.../gg334468.aspx

  • Letoir Profile Picture
    3,460 on at

    I googled on how to use this request message didnt find something.

    Could you tell me how to use this class.

    thnks

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Zorden,

    Check these links:

    I think you are trying to update the Incident Resolution entity resolution field with the Solution ID on Case, not update the Case before Close, right?

    If you want to Update Case before Close then you can use this:

    nickhollis.blogspot.com/.../crm-2011-plugin-to-update-case-incident.html

    By Default the Resolution field is a mandatory field and you cannot customize this, there is no way to embed a script form onload when resolution case form is opened onload

    There are several ways workaround to do:

    1. What you can do is "customize" the Resolution Case for by replacing it to new UI

    www.powerobjects.com/.../use-a-dialog-process-in-microsoft-dynamics-crm-to-replace-the-case-resolution-form

    2. Or you can use a custom dialog and then you close the Case using this code:

    msdn.microsoft.com/.../hh547422.aspx

    3. I haven't tried, but maybe you can try to change the Resolution field from IncidentResolution entity using a Plugin onCreate (Pre) of IncidentResolution.

    The name of the resolution field is Subject

    maybe you can replace using this code:

    if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)

               {

                   //create entity context

                   Entity entity = (Entity)context.InputParameters["Target"];

                   if (entity.LogicalName != "incidentresolution")

                   {

                       return;

                   }

                   try

                   {

                         entity["subject"] = "replace this with your dynamic case resolution field value";

                   }

               }

    But again, it will not give you a pre-filled Resolution field, instead, it will update later.

    You can append as well

    string strFormerSubject = entity["subject"];

    entity["subject"] = String.Format("{0} - {1}", strFormerSubject, "replace this with your dynamic case resolution field value");

    To get your related Case Id you can check the attribute: incidentid.

    And you can get the value of the resolution field in the case (I guess it is a custom field, is it??) using service.Retrieve to get the related case by Id you found from related incidentid.

    I hope this can help you!

    Thanks.

  • Letoir Profile Picture
    3,460 on at

    I tried option 3 to make a plugin, but when should this trigger?

    I dont get it prefilled even not with this:

    string strFormerSubject = entity["subject"];

    entity["subject"] = String.Format("{0} - {1}", strFormerSubject, "replace this with your dynamic case resolution field value");

  • Aileen Gusni Profile Picture
    44,524 on at

    How you registered your plugin?

  • Letoir Profile Picture
    3,460 on at

    Message: Create

    Primary Entity: incidentResolution

    Pre - operation

    --------------

    Message: close

    Primary Entity: incident

    Pre - operation

    --------------

    These i have tried

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans