nmarus / node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API.
MIT License
116 stars 52 forks source link

creating contacts with multiple email/physical addresses #103

Open rehtlaw opened 6 years ago

rehtlaw commented 6 years ago

Hello,

I'm trying to create contacts via node-ews. I'd like for them to have both multiple email addresses as well as multiple physical addresses. I've tried what was shown #47, but

        'PhysicalAdresses': {
          'Entry': [
            {
              'Key': 'Home',
              '$value': passedAddressObj1
            },
            {
              'Key': 'Business',
              '$value': passedAddressObj2
            }
          ],
        },

in the request doesn't seem to work. I have also yet to find an Array equivalent to PhysicalAddresses.

Anyone got a solution for this? Thanks in advance :)

EDIT:

        'PhysicalAdresses': [
          {
            'Entry': {
              'Key': 'Home',
              '$value': passedAddressObj1
            }
          },
          {
            'Entry': {
              'Key': 'Business',
              '$value': passedAddressObj2
            }
          },
        ],

also doesn't work, which at least partially workes for the email addresses (it just adds the latest email in the array, but at least it adds one :D)