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()
+ "\", ID \"" + result.getId()
+ "\", Advertiser ID \"" + result.getAdvertiserId()
+ "\", and containing \"" + result.getTotalNumberOfValues()
+ "\" values was found.");