update the status of the record using XrmSvcToolkit request
function setState() {
//Set the stage to send enquiry letter
XrmSvcToolkit.setState({
id: Xrm.Page.data.entity.getId(),
entityName: "lead",
stateCode: 0,
statusCode: 1, //New
async: false,
});
//Save and Reload form
Xrm.Page.data.refresh(true).then(null, null);
}
Comments
Post a Comment