State Status Code Update On ServiceActivity Entity
// JavaScript source code //var Id = Xrm.Page.data.entity.getId().replace("{","").replace("}",""); function changeStatus() { debugger; //Set the stage to send enquiry letter XrmSvcToolkit.setState({ id: Xrm.Page.data.entity.getId().replace("{", "").replace("}", ""), entityName: "serviceappointment", stateCode: 0, statusCode: 1, //New async: false, }); //Save and Reload form updateService(); Xrm.Page.data.refresh(true); } function updateService() { debugger; XrmSvcToolkit.updateRecord({ entityName: "ServiceAppointment",...