Guest User

Untitled

a guest
Jul 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. CrmService service = connectToCrm();
  2. PropertyCollection Prop = new PropertyCollection();
  3. DynamicEntity Firma = new DynamicEntity();
  4.  
  5. // set table
  6. Firma.Name = EntityName.account.ToString();
  7.  
  8. StringProperty accountName = new StringProperty();
  9. accountName.Name = "name";
  10. accountName.Value = aDict["name"].ToString();
  11. Prop.Add(accountName);
  12.  
  13. StringProperty vendorCode = new StringProperty();
  14. vendorCode.Name = "new_bayikodu";
  15. vendorCode.Value = aDict["new_bayikodu"].ToString();
  16. Prop.Add(vendorCode);
  17.  
  18. StringProperty VD = new StringProperty();
  19. VD.Name = "new_taxoffice";
  20. VD.Value = aDict["new_taxoffice"].ToString();
  21. Prop.Add(VD);
  22.  
  23. StringProperty VN = new StringProperty();
  24. VN.Name = "accountnumber";
  25. VN.Value = aDict["accountnumber"].ToString();
  26. Prop.Add(VN);
  27.  
  28. StringProperty address = new StringProperty();
  29. address.Name = "address1_line1";
  30. address.Value = aDict["address1_line1"].ToString();
  31. Prop.Add(address);
  32.  
  33. StringProperty tel = new StringProperty();
  34. tel.Name = "telephone1";
  35. tel.Value = aDict["telephone1"].ToString();
  36. Prop.Add(tel);
  37.  
  38. StringProperty accountEmail = new StringProperty();
  39. accountEmail.Name = "emailaddress1";
  40. accountEmail.Value = aDict["emailaddress1"].ToString();
  41. Prop.Add(accountEmail);
  42.  
  43. Firma.Properties = Prop;
  44.  
  45. Guid CustomerGuid = service.Create(Firma);
  46.  
  47. PicklistProperty city = new PicklistProperty();
  48. city.Name = "new_city";
  49. city.Value = 23; // City Picklist Value for 'istanbul';
  50. Prop.Add(city);
Add Comment
Please, Sign In to add comment