Advertisement
Guest User

Untitled

a guest
Mar 16th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public void SaveAccount(ParentModel objAccountModel)
  2. {
  3. using (OrganizationService service = new OrganizationService("MyConnectionString"))
  4. {
  5. Guid? accountid = null;
  6.  
  7. if (objAccountModel != null)
  8. {
  9. Entity accEntity = new Entity("account");
  10. accEntity["name"] = objAccountModel.Customer.Company;
  11.  
  12. accountid = service.Create(accEntity);
  13.  
  14. }
  15.  
  16. }
  17. }
  18.  
  19. <add name="MyConnectionString" connectionString="Url=https://makeademo.crm.dynamics.com; Username=asin@makeademo.onmicrosoft.com; Password=aaaaa;" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement