Monday, January 14, 2008

Create Relationships in CRM 3.0 programmatically

Ever have the need to programmatically create a relationship between contacts or between a contact and an account?

I stumbled on this problem when a client requested that I import relationships from the legacy ACT! 6 database.
The field where [Lead source] and [referred by].

The relationship entity schema name is "customerrelationship".
The entity has the following important attributes:

Attribute Description
customerroledescription/partnerroledescription The description for the relationship
customerid/partnerid The Lookup for the customer and partner respectively
customerroleid/partnerroleid The lookup for the relationship role (This can be configured in the Settings section of CRM)


It is that simple, create your class than call the service.create method of the CRM 3.0 to create the relationship.

Have a great day.

Oshri Cohen

Labels: , , ,

2 Comments:

At February 11, 2008 at 11:26 PM , Anonymous Jaber said...

Hello Oshri cohen

Can you able to explain it Little bit in more details as it is marvellous work. An example if you donot mind will be very handy.

Kind Regards

 
At February 12, 2008 at 5:37 PM , Blogger Oshri Cohen said...

Hi Jaber,
If you want quicker responses please email me at cohenoshri@hotmail.com

I will then be able to send you the actual source code for creating relationships.

 

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home