Closed ccrawford93 closed 9 years ago
Even i'm facing similar issue - Rows in Data Extension Not being deleted. Running on Fuel Java SDK v0.999999-pre1.0-2.
Code snippet :
try {
ETResponse
ETDataExtensionRow row = new ETDataExtensionRow(); row.setColumn("Email", "test@gmail.com");
System.out.println("delete row = " + extension.delete(row)); } catch (ETSdkException e) { e.printStackTrace(); }
Log :
delete row = [com.exacttarget.fuelsdk.ETResult[requestId=null,statusCode=Error,statusMessage=Keys Not Found,errorCode=70000,id=null,guid=null]]
Can someone please help me resolve this issue?
I'm not positive this will work, but use the underlying "*interal" package that includes all the SOAP objects and just use the SOAP api for it. I'm using it for other various items that are missing from the sdk and it seems to work fine.
TriggeredSend send = new TriggeredSend();
TriggeredSendDefinition definition = new TriggeredSendDefinition();
SendClassification sendClassification = new SendClassification();
sendClassification.setName("Default Commercial");
sendClassification.setCustomerKey("Default Commercial");
definition.setSendClassification(sendClassification);
definition.setName(sendRequest.getName());
definition.setCustomerKey(sendRequest.getCustomerKey());
send.setTriggeredSendDefinition(definition);
List<com.exacttarget.fuelsdk.internal.Subscriber> subscriberList = new ArrayList<com.exacttarget.fuelsdk.internal.Subscriber>();
for (String subscriberKey : sendRequest.getSubscriberKeyList()) {
com.exacttarget.fuelsdk.internal.Subscriber sub = new com.exacttarget.fuelsdk.internal.Subscriber();
sub.setSubscriberKey(subscriberKey);
subscriberList.add(sub);
}
send.getSubscribers().addAll(subscriberList);
CreateRequest createRequest = new CreateRequest();
createRequest.setOptions(new CreateOptions());
APIObject object = send;
createRequest.getObjects().add(object);
CreateResponse createResponse = soap.create(createRequest);
Just replace TriggeredSend with whatever you're trying to delete (ie: Subscriber) and the CreateRequest/Options/Response with the corresponding delete objects. Use this as a guide and you should be able to take care of anything you need using this manner of code:
https://help.exacttarget.com/en/technical_library/web_service_guide/
Thanks for your response. Developer guide gave me good view of using the SOAP objects and api and tried to implement the same, now I'm able to delete the data extension rows.
Thanks for your guidance on this issue.
Wow the issue still exits
I am currently running on revision 665107845a84be24c5fefd128ad88d2cc80a03b8. If any of this will be fixed in an upcoming release, please let me know.
As of now, I have no way to delete a row in any data extension. Here is my code:
These calls result in an error code of 310007 and a message of "Keys Not Found". I have also tried utilizing the deprecated service, in addition to trying to use the deprecated setter for "Keys" but have had no success:
Furthermore, I have found a related issue in the ruby sdk that could potentially be related given the "properties/property" vs "keys/key". http://salesforce.stackexchange.com/questions/33398/fuel-sdk-ruby-client-delete-a-row-from-a-data-extension
Is this an issue of needing to be refactored, not using the calls in the correct manner, or not using the most recent version of the sdk (which is broken, see other issue I've created). Any information would be helpful.
PS: To be clear, all of the objects and their names are correct and return the corresponding object back to my client. I have traced the issue directly until the point in which the SOAP call is made.