Reputation: 11
I am trying to set empty or blank value on a custom field (List/Record Type) of item which is targeting NetSuite Country List using NetSuite SOAP Request but not able to do so.
List<CustomFieldRef> arrCustomField = new List<CustomFieldRef>();
ListOrRecordRef rec = new ListOrRecordRef();
rec.internalId = "";
SelectCustomFieldRef dcfselect = new SelectCustomFieldRef();
dcfselect.scriptId = "custitem_countryoforigin";
dcfselect.value = rec;
arrCustomField.Add(dcfselect);
setObjectProperty("customFieldList", item, arrCustomField.ToArray());
As ssen rec.internalid is empty while this is not working, same i have passed rec.internalid with null/0/-1, which is also not working.
TIA
Upvotes: 1
Views: 829
Reputation: 403
(1) For custom Fields (List type/Select) use as below tags in SOAP request
<ns9:location internalId="null"/>
OR
(2) Use nullFieldList tag.Please see the code below
<soap:Body>
<platformMsgs:update>
<platformMsgs:record internalId="373" xsi:type="listRel:Customer">
<platformCore:nullFieldList xsi:type="platformCore:NullField">
<platformCore:name>custEntity9</platformCore:name>
</platformCore:nullFieldList>
</platformMsgs:record>
</platformMsgs:update>
</soap:Body>
For custom fields (Free form Text), you can pass null/blank values like this :
<customField xsi:type="StringCustomFieldRef" scriptId="custcol_billing_rule_type">
<value/>
Upvotes: 2