-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact Update for Dictionaries not working #123
Comments
do not use use jsdoc documentation of many classes are not updated (started porting jsdoc very late), the not all internal properties and classes are hidden in Typing. JavaScript based intellisense may still expose all the internal stuffs. |
This worked for PhoneNumbers but not for EmailAddresses |
I have to implement event delegation for changed or updates events. hopefully in a week or so. |
can you try installing dev version and provide feedback. there is a caveat in removing/replacing these entries, see the blog for more details |
I tried it with ews-javascript-api@next and got the same behaveiour. The code I use to update looks like this:
contact.FileAsMapping = undefined; // FileAsMapping is not available in Exchange 2010
contact.Update(ews.ConflictResolutionMode.AlwaysOverwrite).then(function() {
resolve(c.exchangeUniqueId);
}, function(err) {
reject(err);
});
… On 28 Dec 2016, at 19:29, Gautam Singh ***@***.***> wrote:
can you try installing dev version and provide feedback. npm i ***@***.***
there is a caveat in removing/replacing these entries, see the blog for more details <https://blogs.msdn.microsoft.com/emeamsgdev/2012/05/17/ews-managed-api-how-to-remove-email1-email2-email3-from-a-contact/>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#123 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFS1XiSoBEa9IszgD0T0xpzKaVVEVBZcks5rMqp-gaJpZM4Kvqqh>.
|
did you update the code I suggested also, you can use any value for |
I was not using the recommended code. Now I did and it is working correctly for both emails and phone numbers!
This is how it looks now in my code:
var emailEntry1 = new ews.EmailAddressEntry('EmailAddress1', ea);
// contact.EmailAddresses.Entries.set(ews.EmailAddressKey.EmailAddress1, emailEntry1);
contact.EmailAddresses._setItem(ews.EmailAddressKey.EmailAddress1, ea);
...
var phoneEntry = new ews.PhoneNumberEntry(keyStr, stringAsXmlValue(phoneNumber.value));
// contact.PhoneNumbers.Entries.Add(key, phoneEntry);
contact.PhoneNumbers._setItem(key, stringAsXmlValue(phoneNumber.value));
So actually the second parameter in the _setItem function is the string, not the entry as I was using before.
Cool!
… On 29 Dec 2016, at 11:02, Gautam Singh ***@***.***> wrote:
FileAsMapping
|
Using Contact.Update() method to update fields that are stored in Dictionaries (e.g. EmailAddresses) does not actually update those fields in the server, even though the transaction is successful.
Using the same method to update other fields (e.g. JobTitle) succeeds to get the updates in the server as expected.
Server is running Exchange 2010 SP2.
The following code reflect the described behaviour using Nodejs :
The console output:
(notice how emails and phone numbers are not changed whereas GivenName is)
The text was updated successfully, but these errors were encountered: