 |  | | Author: |  | shashidhar (121.246.229.249.static-hyderabad.vsnl.net.---) |  | | Date: |  | 11.06.08 |  | I am trying to create a new entity in crm and assign some properties and values to existing/new properties. Below are to two approaches I am using, one of them works fine but not both sometimes either of them won’t work. (I already defined properties using CRM properties for example StringProperty, LookupProperty)
1) DynamicEntity dyEntity = new DynamicEntity();
dyEntity.Name = EntityName.invoice.ToString();
ArrayList Props = new ArrayList();
dyEntity.Properties = (CrmService.Property[])Props.ToArray(typeof(CrmService.Property));
2) DynamicEntity dyEntity = new DynamicEntity();
dyEntity.Name = EntityName.invoice.ToString();
ArrayList Props = new ArrayList();
dyEntity.Properties = new Property[Props.Count];
for (int j = 0; j < Props.Count; j++)
dyEntity.Properties[j] = (Property)Props[j]; |

|