Exemplo n.º 1
0
 public static void UpdateSubscriberId(IDynamicsCrmConnection dynamicsCrmConnection, Guid leadId, int subscriberId)
 {
     AbstractCrm.Update(dynamicsCrmConnection, "lead", "leadid", leadId, new Dictionary <string, object>()
     {
         { "new_mailrelaysubscriberid", subscriberId },
     });
 }
Exemplo n.º 2
0
        protected static void CreateFromContent(IDynamicsCrmConnection dynamicsCrmConnection, AbstractCrm crmObject, Dictionary <string, string> allContent)
        {
            foreach (KeyValuePair <string, string> keyValue in allContent)
            {
                string key         = keyValue.Key;
                string valueString = keyValue.Value;

                Type targetType = Utilities.ReflectionHelper.GetType(crmObject, key);
                if (targetType == null)
                {
                    continue;
                }

                object value = Utilities.ReflectionHelper.StringToObject(valueString, targetType);

                Utilities.ReflectionHelper.SetValue(crmObject, key, value);
            }
        }