Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.

Duplicate key error on custom table with autopk="true"

Avatar

Level 4

Hi,

We are experiencing a recurring duplicate key error when inserting records into a custom Adobe Campaign Classic schema via a SOAP web service. The error is:
Cannot insert duplicate key row in object 'neolane.LfTmResponseAPIData'
with unique index 'LfTmResponseAPIData_id'

In the schema we have just this:
 <element autopk="true" desc="this schema contains the data as received for TM response data into lf:tmResponseService.jssp"
label="tmResponseAPIData" name="tmResponseAPIData">

What is the correct and supported way in Adobe Campaign Classic to ensure unique IDs and avoid duplicate key errors in this situation?

Do I need to define a an unique key in the schema as below?
<key name="tmResponseIdx">
<keyfield xpath="@field1"/>
<keyfield xpath="@field2"/>
</key>

Or do I need to create a new sequence in xtkNewId? How do I proceed in this case?

Thanks


1 Reply

Avatar

Level 10

The error may be in the your custom API handler rather than the schema, seems you are consuming via the jssp custom api rather than the soaprouter native api?

 

Share a sample request, and the jssp endpoint script.