Save, Resolve and Close Case form with Custom button
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 ![]()
This was originally posted here.

Like
Report
*This post is locked for comments