示例#1
0
        public void Process(SetSystemCrmPropertyArgs args)
        {
            var stateProperty = GetStateProperty(args);

            if (stateProperty != null)
            {
                var statuscode = args["statuscode"];

                var request = new SetStateDynamicEntityRequest
                {
                    Entity = new Moniker {
                        Id = args.EntityId, Name = args.EntityName
                    },
                    Status = GetStatusValue((StatusProperty)statuscode),
                    State  = ((StateProperty)stateProperty).Value,
                };
                CrmGate.Instance.Execute(request);
            }
        }
示例#2
0
 public ICrmAttribute GetStateProperty(SetSystemCrmPropertyArgs args)
 {
     return(args["statecode"] ?? args.Entity.Attributes["statecode"]);
 }