private void SetStateStatus(ref ServiceObject so) { SourceCode.SmartObjects.Services.ServiceSDK.Objects.Method meth = so.Methods[0]; WizardFunctions helper = new WizardFunctions(); CRMState state = new CRMState(); state.Config = crmconfig; try { state.Entity = NotNull(so.Properties["Entity"].Value); state.EntityId = NotNull(so.Properties["EntityId"].Value); state.State = int.Parse(NotNull(so.Properties["State"].Value)); state.Status = int.Parse(NotNull(so.Properties["Status"].Value)); RestResponse<CRMState> response = helper.SetStateStatus(state, config); so.Properties.InitResultTable(); for (int c = 0; c < meth.ReturnProperties.Count; c += 1) { Property prop = so.Properties[meth.ReturnProperties[c]]; prop = SetStateStatusProperties(prop, response); } so.Properties.BindPropertiesToResultTable(); } catch (Exception ex) { throw; } }