Search code examples
xmlnetsuiteboomi

Netsuite XML syntax - setting multiple fields to null


I'm using Boomi with Netsuite web services, updating an address. The problem I'm encountering is that the existing address has addr1, addr2, addr3, city, state & zip, but the address I'm updating it to only has addr1, addr2, city. So the fields I'm sending (addr1, addr2 and city) are updating perfectly, but nothing at all is happening on the other fields. This leaves me with a nonsensical address.

There's something available in the Netsuite schema called NullFieldList, but I can't work out how I send through a list of items to it. Currently I've tried the following (snipped)

<ns1:shippingAddress>
    <ns2:nullFieldList>
      <ns2:name>attention,addr3,city,state,zip</ns2:name>
    </ns2:nullFieldList> 

But this isn't having the desired effect. Do I need single quotes, brackets, separate elements?


Solution

  • Each field you want to set as null should be in its own element

    <nullFieldList>
        <name>attention</name>
        <name>addr3</name>
        <name>city</name>
        <name>state</name>
        <name>zip</name>
    </nullFieldList>