private void StartCRMWorkflow(ref ServiceObject so) { SourceCode.SmartObjects.Services.ServiceSDK.Objects.Method meth = so.Methods[0]; CRMWorkflow crmWF = new CRMWorkflow(); crmWF.Config = crmconfig; try { crmWF.EntityId = NotNull(so.Properties["EntityId"].Value); crmWF.WorkflowName = NotNull(so.Properties["WorkflowName"].Value); CRMWorkflow response = CRMFunctions.CRMStartWorkflow(crmWF); so.Properties.InitResultTable(); for (int c = 0; c < meth.ReturnProperties.Count; c += 1) { Property prop = so.Properties[meth.ReturnProperties[c]]; prop = SetCRMWorkflowProperties(prop, response); } so.Properties.BindPropertiesToResultTable(); } catch (Exception ex) { throw; } }
public CRMWorkflow CRMStartWorkflow(CRMWorkflow crmWF) { CRMFunctions function = new CRMFunctions(crmWF.Config); return(function.CRMStartWorkflow(crmWF)); }