FuelSDK-Java icon indicating copy to clipboard operation
FuelSDK-Java copied to clipboard

CustomerKey does not get injected on row delete

Open Philippus opened this issue 6 years ago • 1 comments

I'm getting a Data Extension Key not specified in ObjectID, CustomerKey, or Name when trying to delete an ETDataExtensionRow while inserting one works fine. Looking at the SOAP request that is being performed it seems the <CustomerKey>...</CustomerKey> parameter is not injected in the delete request, while it is injected in the insert request. Am I doing something wrong? example code (scala but should not matter) is:

 var configuration = new ETConfiguration()
  configuration.set("clientId", myClientId)
  configuration.set("clientSecret", myClientSecret)

  val client = new ETClient(configuration)

  var dataextensionrow = new ETDataExtensionRow()
  dataextensionrow.setDataExtensionKey(myDataExtensionKey)
  dataextensionrow.setColumn(myColumnKey, myColumnValue)

  var dataextension = new ETDataExtension()
  dataextension.setClient(client)
  dataextension.setKey(myDataExtensionKey)

  val response = dataextension.insert(dataextensionrow)

  val result = response.getResult() // this works, row gets inserted

  val response2 = dataextension.delete(dataextensionrow)

  val result2 = response2.getResult() // this fails, with error message 'Data Extension Key not specified in ObjectID, CustomerKey, or Name'

Philippus avatar Jun 04 '18 14:06 Philippus

Hi, I am getting the same error. Looks like the fix provided by @Philippus is still not merged :(

azkumar avatar Jun 09 '19 08:06 azkumar