component.setField{}

component.setField{} is used to update an existing custom field value. This API sets a new field value for a component’s custom field by passing the custom field name as the key and the value you wish to set.

For example, setting the custom field port value to 6543:

component.setField{key="port", value=6543}

You cannot create a new custom field using this function.