Hi,
Can anyone please confirm if the below approach is correct if we want to insert or update the data in a table using JS?
insertUpdateQuery = <order _key="@custId,@productName,@subProductName" _operation="insertOrUpdate" xtkschema = "cus:order"
productName = { productName }
subProductName = { subProductName }
custId = { custId }
productid= { productid}
datetime = { datetime }
/>
xtk.session.Write(insertUpdateQuery);
We are getting duplicate key value violates unique constraint errors in logs as during insertion or updation we can get data that might be already present based on the 3 key fields.
Based on my understanding if we use insertorUpdate operation it should not give a duplicate error. Can anyone please with this?
Version is V8
Thanks