Skip to main content

Notifications

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

  • yleclerc Profile Picture
    1,549 on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    Anyone ever managed to make this work? We just want to get the words "Problem solved" defaulted into the "Resolution" field.

  • Community Member Profile Picture
    on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    Were you ever able to resolve this?   I'm running into the same issue as I am capturing a custom resolution text field on the case form and would like to update the subject field on the related incidentresolution.

  • Letoir Profile Picture
    3,460 on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    Message: Create

    Primary Entity: incidentResolution

    Pre - operation

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

    Message: close

    Primary Entity: incident

    Pre - operation

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

    These i have tried

  • Aileen Gusni Profile Picture
    44,524 on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    How you registered your plugin?

  • Letoir Profile Picture
    3,460 on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    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
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    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
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

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

    Could you tell me how to use this class.

    thnks

  • Suggested answer
    Parvez Ghumra Profile Picture
    7 on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    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
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    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.

  • Guido Preite Profile Picture
    54,077 Moderator on at
    RE: Prefill "Resolution" field with a solutionID from the Case on Close

    which plugin message you are checking?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May 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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans