Linking contact to account does not display linked account

M

Mike

I have used VB.NET 2005 to create a new business contact and link it to an
existing account. The code runs ok and the new contact is created. When I go
to the account I can see the new contact in the list of contacts. The
problem is that the linked account does not show on the business contact
record - eg the Account field underneath 'Linked Account' is blank. Many
thanks for any assistance.
 
C

Clinton Ford [MSFT]

After setting the "Parent Entity EntryID" as described in this sample...
http://msdn2.microsoft.com/en-us/library/aa431883.aspx

....be sure to also set the "Parent Account Name" as in following C# code:

if (newContact1.UserProperties["Parent Account Name"] == null)
{
userProp = newContact1.UserProperties.Add("Parent Account Name", Microsoft.Office.Interop.Outlook.OlUserPropertyType.olText,
false, false);
userProp.Value = newAccount.FirstName;
}

--
Visit team blog at http://blogs.msdn.com/bcm
This posting is provided "AS IS" with no warranties, and confers no rights
I have used VB.NET 2005 to create a new business contact and link it to an
existing account. The code runs ok and the new contact is created. When I go
to the account I can see the new contact in the list of contacts. The
problem is that the linked account does not show on the business contact
record - eg the Account field underneath 'Linked Account' is blank. Many
thanks for any assistance.
 
B

Balaji [MS]

I have used VB.NET 2005 to create a new business contact and link it to an
existing account. The code runs ok and the new contact is created. When I go
to the account I can see the new contact in the list of contacts. The
problem is that the linked account does not show on the business contact
record - eg the Account field underneath 'Linked Account' is blank. Many
thanks for any assistance.

There is sample code for this on MSDN that works correctly. You can
find the sample code at http://msdn2.microsoft.com/en-us/library/aa431883.aspx.
 
M

Mike

Many thanks for your assistance.

This code does indeed link the record. The contact appears under the
account. However the account name is not displayed in the contact record. I
think you have to set the Account Name after linking the record but this
only seems to work intermittently.
 
M

Mike

Sorry Clinton, I missed your posting. Thank you very much indeed for the
information. I was setting the Account name instead of the parent account
name. It all works great. Again many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top