salesforce-marketingcloud / FuelSDK-Java

Salesforce Marketing Cloud Java SDK
BSD 3-Clause "New" or "Revised" License
72 stars 123 forks source link

[BUG] #119

Open ifmason2 opened 4 years ago

ifmason2 commented 4 years ago

Issue ETDataExtension.retrieveRows() does not retrieve the Id of the columns

To Reproduce Given the following method private ETDataExtension getDataExtension(ETClient client, String dataExtensionName) throws ETSdkException { ETDataExtension de = null; ETResponse<ETDataExtension> retrieveResponse = client.retrieve(ETDataExtension.class, "name=" + dataExtensionName); if( retrieveResponse.getResponseCode().equals("OK")) { ETResult<ETDataExtension> result = retrieveResponse.getResult(); de = result.getObject(); de.retrieveColumns(); List<String> columnNames = de.getColumnNames(); System.out.println(columnNames); for( String columnName : columnNames ) { ETDataExtensionColumn column = de.getColumn(columnName); System.out.println(column); System.out.println(column.getId()); } } return de; } Expected behavior Expected output: `com.exacttarget.fuelsdk.ETDataExtensionColumn[ id = key = [FD0F8D76-920A-4C9D-B662-EBFFE0785A95].[LastName] name = lastname createdDate = Sun Feb 23 18:39:00 AEDT 2020 modifiedDate = Sun Feb 23 18:39:00 AEDT 2020 type = TEXT defaultValue = isPrimaryKey = false isRequired = true length = 50 ]

` Actual output: `com.exacttarget.fuelsdk.ETDataExtensionColumn[ key = [FD0F8D76-920A-4C9D-B662-EBFFE0785A95].[LastName] name = lastname createdDate = Sun Feb 23 18:39:00 AEDT 2020 modifiedDate = Sun Feb 23 18:39:00 AEDT 2020 type = TEXT defaultValue = isPrimaryKey = false isRequired = true length = 50 ] null ` **Environment** - SDK Version [e.g. 1.5.0] - Java/ JDK version JDK 1.8.0 171-b11 **The bug has the severity** - [ ] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult. **Additional Context** Using this functionality to dynamically create Dynamic Content Blocks. Dynamic Content Blocks can be opened, and the rules can be listed, but they cannot be edited, presumably because it cannot locate the right column because the schema columns are being emitted with id = null.