none
OwnerID

Answers

  • here is example code to assign owner for Account..


    newAccount.ownerid = new Owner();
    
    // Set the value to the ID of a user in the system.
    newAccount.ownerid.Value = new Guid("556E49E6-581B-4B61-91E4-6A7E7E8E6A9E");
    
    // Set the type code of the owner.
    newAccount.ownerid.type = EntityName.systemuser.ToString();
    
    // Now create or update the entity instance.
    • Marked as answer by Hussain Saffar Wednesday, December 02, 2009 10:08 AM
    Wednesday, December 02, 2009 9:13 AM

All replies

  • For Dynamic Entity you can use :

    public static OwnerProperty CreateOwnerProperty(
      string  name,
      Owner  value
    );

    dynamicEntity.Add(CrmTypes.CreateOwnerProperty("ownerid",SystemUserId);

    For Typed Entity you can use

    owner user = new owner();
    objAccount.ownerid = SystemUserId;
    Jai Ho CRM http://mscrmkb.blogspot.com Skype - amol.gholap
    Tuesday, December 01, 2009 5:27 PM
  • here is example code to assign owner for Account..


    newAccount.ownerid = new Owner();
    
    // Set the value to the ID of a user in the system.
    newAccount.ownerid.Value = new Guid("556E49E6-581B-4B61-91E4-6A7E7E8E6A9E");
    
    // Set the type code of the owner.
    newAccount.ownerid.type = EntityName.systemuser.ToString();
    
    // Now create or update the entity instance.
    • Marked as answer by Hussain Saffar Wednesday, December 02, 2009 10:08 AM
    Wednesday, December 02, 2009 9:13 AM