0

I am trying to create a connection with connection role (Eg:test) between account entity and contact entity through c# code.

Can anyone tell me/share me code as to how to achieve this progamatically.

i got this reference from msdn..... but i am not able to do this.

 _serviceProxy.EnableProxyTypes();

                Connection newConnection = new Connection
                {
                    Record1Id = new EntityReference(Account.EntityLogicalName,
                        _accountId),
                    Record1RoleId = new EntityReference(ConnectionRole.EntityLogicalName,
                        _connectionRoleId),
                    Record2RoleId = new EntityReference(ConnectionRole.EntityLogicalName,
                        _connectionRoleId),
                    Record2Id = new EntityReference(Contact.EntityLogicalName,
                        _contactId)
                };
4

0 回答 0