I'm trying the following code:
Platform.Load("Core", "1");
var prox = new Script.Util.WSProxy();
function addDE(DEKey) {
var updateObject = {
CustomerKey: DEKey,
Properties: [{
Name: 'Field1'
Value: 'Field1'
}]
}
var options = {
SaveOptions: [{
'PropertyName': '*',
SaveAction: 'AddOnly'
}]
};
var res = prox.updateItem('DataExtensionObject', updateObject, options);
}
var result = addDE("Test DE")
But I'm receiving the following error:
{
"Status": "Error",
"RequestID": "9478ef48-2a6e-405f-a08e-102bb8d1a4f6",
"Results": [
{
"ErrorMessage": "SaveAction: AddOnly violation",
"KeyErrors": null,
"ValueErrors": null,
"Object": null,
"UpdateResults": null,
"ParentPropertyName": null,
"StatusCode": "Error",
"StatusMessage": "SaveAction: AddOnly violation",
"OrdinalID": 0,
"ErrorCode": 68000,
"RequestID": null,
"ConversationID": null,
"OverallStatusCode": null,
"RequestType": "Synchronous",
"ResultType": null,
"ResultDetailXML": null
}
]
}
I can't find any practical examples online on "SaveAction:AddOnly". Does this work?