My client wanted to remove (or hide) “Total Time” and “Billable Time” fields in the Case Close dialog window:
Of course, I knew that it is possible to open the file CRM_Installation_Directory\CRM\Web\CS\cases\dlg_closecase.aspx, add several lines of code, and hide fields and labels; but this, the most obvious and easiest way out, had 2 disadvantages:
1. This solution is unsupported and it could be broken with new Rollups.
2. This solution does not work for CRM Online.
So I decided to solve this task using supported approaches.
Step 1. Create a new solution and put the Case entity inside:
Step 3: Create the dialog to be used instead of a standard one and add it to solution. It should look like following:
Step 4: Remove the original “Close Case” and create a new “Close Case” button using Ribbon Customization. I usually do it using Ribbon Workbench:
Publish the changes that you’ve made. Demonstration:
Andrii, this is brilliant, very well done, thanks!
Thanks, Ivan! See you tomorrow 😉
Send me an email, I will reply with attachments.
You can send me an email on:
If possible can I receive a copy also at,
Hi Andri , I need to explorer similar kind of customization required in Opportunity Close that is one of my client requirement …if possible can you share this code with me ?
Good idea but I would suggest a simpler way. Create a CRM dialog and load that instead of the default dialog when the resolve button is pressed.
Thanks! I thought about suggested approach but one thing I was not able to do is dynamically fill optionset with status codes available for incident entity. Do you know how to do that?
This is awesome, Great Job Andrii!!!
Great Stuff Andrii, I also have same similar requirement related to Opportunity Close. Could you share same code as Sathesh please. Thank you.
Recheck the end of post – I've put reference to Skydrive where I've stored solution. Do you see it?
Thank you very much Andrii..
Not sure doing it dynamically is worth it. Status Codes dont change that often.
Still, you could do this in the js that launches the dialog :
1) Check if the list of status codes changed.
2) If so update a global option set on which your Resolve case Dialog is based.
3) Launch your Resolve Case dialog.
If for some reason this behavior is still desired then you would have to add some js code that fires before you load the Dialog and verifys if the list of status codes changed.
You might also build a Custom Activity Workflow that would update the option set as the first step of your dialog.
Oh, yes, I see the files. Thanks
You are right, dialog can be used but If I'm not wrong anyway you would not be able to create incident resolution activity that is created during closing of incident. So you would not be able to close incident with proper fields mapping like description, resolution and so on.
Regarding custom workflow activity – at the moment it can be used but closing of incident would be done asynchronously and you will see the result only after some period of time.
Great Job Andrii,
Sometime we do not want the resolve case dialog box itself.
I have written one post on my blog "How can be overwrite the resolve Case System ribbon button functionality?".
Your article looks great, but you've used a plugin in your functionality. I believe that task can be completed without this step. I have already done this before and I will publish article soon how to do that.
This comment has been removed by the author.
I believe you will come up with better solution.
Thanks, I will try!
Something original. Love your work. Keep it up.
Thanks in Advance !!
Recheck the bottom of post – it has reference to SkyDrive where you can download source code.
I am getting an error when i am trying to import the solution.The error says the there are missing files which are : msa_partnercontactid of type field ,msa_contact_incident of type relationship,msa_contact_Incident of type relationship
thanks a lot 🙂
hallo, the source code ?
Here is solution url – https://onedrive.live.com/?authkey=%21AP2OuIJIgP71JOM&id=F63E4BCD4A7F64A4%21223&cid=F63E4BCD4A7F64A4
Hi! Perfect solution! Please, update link to solution, your one drive url contains only SureStep.exe. Thanks!
Thank you, Kirill. Looks like that file is lost and I’m really sorry for that.
thanks for sharing information
Can you please send me a copy as well? Please and Thank you!
It was a long time ago and I don’t think I have solution files anymore. I believe you came to this post from my reply of Dynamics forum. My goal was to give you waypoints to achieve your goal.
Hey Andrii, fantastic post, very informative and useful.
I am trying to replicate most the OOB route button functionality but without the option to remove the item from the queue.
You can check this post – https://butenko.pro/2019/12/23/xrm-navigation-navigateto-gotchas-tricks-and-limitations/
If you’re familiar with Fluent UI/React you can check the following posts as well: