if (customFieldIds.size() > 0) {
// Modify statement for action.
filterStatement.setQuery("WHERE id IN (" + StringUtils.join(customFieldIds, ",") + ")");
// Create action.
DeactivateCustomFields action = new DeactivateCustomFields();
// Perform action.
UpdateResult result = customFieldService.performCustomFieldAction(action, filterStatement);
// Display results.