Closed relief-melone closed 7 years ago
The trick with node-soap (and therefore node-ews) is to make the value of the item you need multiple of an array.
Example from #47:
ToRecipients:{
Mailbox:[
{EmailAddress: "address1@example.com"},
{EmailAddress: "address2@example.com"}
]
}
Note how the "Mailbox" has the array as this will create multiple "Mailbox" elements inside "ToRecipients" which is what we want. The resulting XML structure should look something like this:
<ToRecipients>
<Mailbox>
<EmailAddress>address1@example.com<EmailAddress/>
</Mailbox>
<Mailbox>
<EmailAddress>address2@example.com<EmailAddress/>
</Mailbox>
</ToRecipients>
Issue #24 has some examples more specific to what you are asking:
'AdditionalProperties': {
'FieldURI': [
{ 'attributes': { 'FieldURI': 'item:Subject'}},
{ 'attributes': { 'FieldURI': 'calendar:Start'}},
{ 'attributes': { 'FieldURI': 'calendar:End'}}
]
}
Thanks. That issue was ectually exactly what i was looking for. Just didn't sound like my problem when I browsed through the topics earlier.
In the soap-Request for example if you do a findItem Request and specify your ItemShape your markup will look like this
So if you convert this to a json, it will not work, as you will specify the value FieldURI 3 times. Is there already a solution to this? I managed to name one key "t:FieldURI" and the other one "FieldURI" which will at least allow me to specify two Additional Properties. Would be great if you could help.
Greetings Chris