Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

How to delete some columns from an existing ETDataExtension using ETClient? #104

Open
shuoshuo70 opened this issue Mar 27, 2019 · 0 comments

Comments

@shuoshuo70
Copy link

shuoshuo70 commented Mar 27, 2019

when I deleted columns from a data extension like this:

public void deleteColumns(List<String> columnNames) throws Exception {
        for (String columnName : columnNames) {
            ETDataExtensionColumn column = dataExtension.getColumn(columnName);
            ETResponse<ETDataExtensionColumn> respoonse = ClientLoader
                    .loadClient()
                    .delete(ETDataExtensionColumn.class, "key=" + column.getKey());
            System.out.println(response);
        }
    }

I got the error:

com.exacttarget.fuelsdk.ETResponse[
    batchResult = com.exacttarget.fuelsdk.ETResult[
        status = ERROR
        requestId = a4be0cf5-fdeb-4cd6-a19d-06bbc00375ab
        responseCode = Error
        responseMessage = Error
    ]
    individualResults = [com.exacttarget.fuelsdk.ETResult[
        status = ERROR
        responseCode = Error
        responseMessage = Unable to find a handler for object type: DataExtensionField.
    ]]
    moreResults = false
]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant