简体   繁体   中英

Outlook Web App doesn't show contact name

I'm working on a CRM application to sync CRM data to Exchange using a service I'm writing in C#. After instiating the EWS connection:

ExchangeService es = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
es.AutodiscoverUrl("SamGam@TheShire.com");

I can create a contact and edit the details:

...
Contact contact = new Contact(es);
contact.GivenName = "Samwise";
contact.Surname = "Gamgee";
contact.DisplayName = "Samwise Gamgee";
...

Then save it

...
contact.Save();

And now it will appear in the user's exchange contact mailbox. In the desktop version of Outlook it looks ok:

桌面展望

But in the Outlook web app I see this:

网络应用展望

Not showing the name and having Untitled Contact eliminates any usability for a real user. If I double click on the contact in the list to edit the details I get this showing the First name and Last name.

在此处输入图片说明

And then if I save it the name will appear in the contact list and view details.

Is there anything I can do to have it appear in the list automatically for users who use the outlook web app?

Thanks!

You should be setting the FileAs mapping and I would also always set the Subject field to the displayname as this can also cause problems eg

contact.FileAsMapping = FileAsMapping.SurnameCommaGivenName;
contact.Subject = "Samwise Gamgee";

On 2013 and Office365 there is also a few other properties you should set see https://social.msdn.microsoft.com/Forums/sqlserver/en-US/90d7e749-977e-4191-87cf-725007a326b4/contacts-created-by-ews-v20-are-visible-in-outlook-but-not-in-owa-in-office-365?forum=exchangesvrdevelopment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM