Search This Blog

Saturday, June 20, 2015

Change status reason using javascript and XrmSvcTool CRM 2013

function ChangeStatusReason() {
    //Set the stage to send enquiry letter
    XrmSvcToolkit.setState({
        id: Xrm.Page.data.entity.getId(),//record GUID
        entityName: "cms_applicant",//entity name
        stateCode: 0,//status code
        statusCode: 175650003, //status reason code
        async: false,
    });
    //Save and Reload form
    Xrm.Page.data.refresh(true).then(null, null);
}

No comments:

Post a Comment