public static void runExample(
DfaServices dfaServices, DfaSession session, String creativeFieldValueName,
long creativeFieldId) throws Exception {
// Request the service.
CreativeFieldRemote service = dfaServices.get(session, CreativeFieldRemote.class);
// Create the creative field value.
CreativeFieldValue creativeFieldValue = new CreativeFieldValue();
creativeFieldValue.setId(-1);
creativeFieldValue.setName(creativeFieldValueName);
creativeFieldValue.setCreativeFieldId(creativeFieldId);
// Save the creative field value.
CreativeFieldValueSaveResult creativeFieldValueSaveResult =
service.saveCreativeFieldValue(creativeFieldValue);
// Display the new creative field value ID.
System.out.printf("Creative field value with ID \"%s\" was created.%n",
creativeFieldValueSaveResult.getId());
}