🔧 Maintenance Alert: World will be on Read-Only Mode on February 18th, 10:00 PM – 11:00 PM EST / 7:00 PM – 8:00 PM PST / 4:00 AM – 5:00 AM CET (Feb 19). Browsing available, but log-ins and submissions will be disabled.

Set Organization to CustomerContact

Vote:
 

How I can set Organization to CustomerContact via code and how it can get list of all organizations which are setup in commerce?

#88006
Jun 27, 2014 13:59
Vote:
 

You can get list of all organization  by CustomerContext.Current.GetAllOrganization()

#88039
Jun 30, 2014 10:55
Vote:
 

Solution, I found how to set organization to contact, is:

customerContact.OwnerId = organization.PrimaryKeyId;

#88085
Jul 01, 2014 14:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.