Saving new EntityObjectProperty not working

Member since: 2007

Hello!

I have added a Company property on the Contact Object in Commerce Manager, but i don-t get it to save!! whats wrong?

                    EntityObjectProperty EO = CustomerContact["company"] as EntityObjectProperty;
                    if (EO == null)
                    {
                        CustomerContact["company"] = new EntityObjectProperty("company",Company.Text);
                    }
                    else
                    {
                        CustomerContact.Properties["company"].Value = Company.Text;
                    }
					CustomerContact.SaveChanges();

 Ive also tried

 CustomerContact["company"] = Company.Text;

 

#57063 Feb 23, 2012 12:54
  • Member since: 2007

    oh sk*t, it is case sensitive, this is enough:

    CustomerContact["Company"] = Company.Text;
    #57067 Feb 23, 2012 14:56