public SubscriptionTrackingDeletedObject(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["timestamp"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public MonthlyFiscalCalendar(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["userfiscalcalendarid"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public SocialInsightsConfiguration(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["socialinsightsconfigurationid"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public BusinessUnitNewsArticle(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["businessunitnewsarticleid"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public SdkMessageResponseField(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["sdkmessageresponsefieldid"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public TeamSyncAttributeMappingProfiles(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); if (p.PropertyType == typeof(System.Guid)) { // Type is Guid, must be Id base.Id = (System.Guid)value; Attributes["teamsyncattributemappingprofileid"] = base.Id; } else if (p.Name == "FormattedValues") { // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); } else { Attributes[p.Name.ToLower()] = value; } } }
public defra_applicationtaskdefinition(object anonymousType) : this() { foreach (var p in anonymousType.GetType().GetProperties()) { var value = p.GetValue(anonymousType, null); var name = p.Name.ToLower(); if (name.EndsWith("enum") && value.GetType().BaseType == typeof(System.Enum)) { value = new Microsoft.Xrm.Sdk.OptionSetValue((int) value); name = name.Remove(name.Length - "enum".Length); } switch (name) { case "id": base.Id = (System.Guid)value; Attributes["defra_applicationtaskdefinitionid"] = base.Id; break; case "defra_applicationtaskdefinitionid": var id = (System.Nullable<System.Guid>) value; if(id == null){ continue; } base.Id = id.Value; Attributes[name] = base.Id; break; case "formattedvalues": // Add Support for FormattedValues FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value); break; default: Attributes[name] = value; break; } } }