Update Fields
When you call the updateField method to update field attributes, you must specify the following required parameters.
Parameter
Description
object
Full identifier of the object to which the field is related.
field
Full identifier of the field to be updated.
values
Map whose key corresponds to any valid full identifier of a Field object, the value of which is used to update the existing field. Only those attributes to be updated must be specified, and the remaining attributes are not modified.
The following fields cannot be updated:
io_uuid
io_datatype
io_deleted
io_seed_field
Signature fields (created_on, created_by, and so on)
io_owner
* 
When identifiers, namespaces, and application values for a specified field are changed, changes are propagated to its field options. For fields with related relationships or options, namespace and application value updates are also propagated.
updateField() Method Definition
* 
This method primarily supports updates to general field attributes. For information on how to update specific attributes of related relationships or option lists, see Update Relationship Fields and Update Option List Fields.
Use this method to update specified fields and their field options, relationships, and options, and return the fields. If invalid parameters are specified, or if the field cannot be created on the platform (for example, because it is not valid), an exception is thrown.
public static IMaxObject updateField(String relatedObjectFullIdentifier, String fieldFullIdentifier, Map<String,Object> values)
Example
To modify test_field in the Showcase object and update the application, short description, and update-safe attributes:
import com.servicemax.core.utils.Definitions

Definitions.updateField('io_showcase', 'io_test_field', [io_application: 'Max Designer', io_short_description: 'Field used by Showcase', io_update_safe: true])
For more information:
Was this helpful?