Status Change using WebApi

In Dynamics 365, OOTB status field value can be changed in many different ways. Following WebApi can be used to update the Status (statecode + statuscode) as follows. changeStatus = function (executionContext, entityLogicalName, recordId, statecode, statuscode) { // Remove brackets from the GUID if there's any var id = recordId.replace("{", "").replace("}", ""); // Set statecode …