function updateProcess(CurrentRecordId,stageId){ 'use strict'; var fetchXml = '<fetch>' + " <entity name='new_approval_process' >" + " <attribute name='businessprocessflowinstanceid' />" + " <attribute name='statuscode' />" + ' <filter>' + " <condition attribute='bpf_entityrecordid' operator='eq' value='" + CurrentRecordId + "' />" + ' </filter>' + ' </entity>' + '</fetch>' var result = retrieveMultipleRecordsSyc('new_approval_processes', fetchXml) var businessprocessflowinstanceid = result[0].businessprocessflowinstanceid var data = { "[email protected]": "/processstages(" + stageId + ")" } Xrm.WebApi.updateRecord('new_approval_processes', businessprocessflowinstanceid, data).then( function success(result) { //todo }, function (error) { //todo } ) }
标签:function,businessprocessflowinstanceid,BPF,Dynamic,JS,result,var From: https://www.cnblogs.com/BricksMover/p/17360976.html