private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";
public static void runExample(
DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
// Request the service.
CreativeFieldRemote service = dfaServices.get(session, CreativeFieldRemote.class);
// Set up creative field search criteria structure.
CreativeFieldSearchCriteria creativeFieldSearchCriteria = new CreativeFieldSearchCriteria();
creativeFieldSearchCriteria.setPageSize(10);
creativeFieldSearchCriteria.setSearchString(searchString);
// Get creative fields for the selected criteria.
CreativeFieldRecordSet creativeFields =
service.getCreativeFields(creativeFieldSearchCriteria);
// Display creative field names, IDs, advertiser IDs, and number of values.
if (creativeFields.getRecords() != null) {
for (CreativeField result : creativeFields.getRecords()) {
System.out.println("Creative field with name \"" + result.getName()