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 :
Dynamics 365 Community / Blogs / CRM TIPS By PRM / Save, Resolve and Close Cas...

Save, Resolve and Close Case form with Custom button

P. R. M Profile Picture P. R. M 739

Recently, we come across a requirement to do Save, Resolve and Close Operations on a single click. Client dont want see the Case Resolution Pop-up.

We have implemented this with below steps:

1. Created a Custom button on Case Form “Save, Resolve and Close”

2. Created a Custom Action “Resolve Case” – Added a step to Resolve Case

3. Prepared below Java script and called from Custom Button Click Event:

a. Its asks for the confirmation, On Clicking OK

b. It will save the Case form, on successful Save

c. Call Custom Action “Resolve Case”, on successful Action

d. Close the Case form

Xrm.Utility.confirmDialog(“Do you wish to continue to Save, Resolve and Close the case ?”, function () {                      
      Xrm.Page.data.save().then(function () {
         var entityId = formContext.data.entity.getId();
         var entityName = formContext.data.entity.getEntityName();

        Xrm.Utility.invokeProcessAction(“new_ResolveCase”, { “Target”: { id: entityId, LogicalName: entityName } }).then(function success(result) {
            formContext.ui.close();
         },
         function (error) { alert(error); }
         );
     });
}, function (error) { alert(error); });

Hope this helps someone who has similar requirement Smile


This was originally posted here.

Comments

*This post is locked for comments