userfieldconfig.update
Description and parameters
userfieldconfig.update({moduleId: string, id: number, field: {}})
Method updates field value.
Parameters
Class | Description | Available from version |
---|---|---|
moduleId | Module string ID. Required. | |
id | Field settings ID. Required. | |
field | List with new field setting fields. Similar to the method userfieldconfig.add, but:
|
Be cautious when handling value variants for lists.
Returned value and example
Returned value
Method returns the same data as the method userfieldconfig.get for updated field.
Examples
Updating flags and language phrases, without excluding value variants
{ "moduleId": "rpa", "id": 170, "field": { "mandatory": "Y", "editFormLabel": { "en": "New field name" } } }
Example for deleting all value variants.
{ "moduleId": "rpa", "id": 170, "field": { "userTypeId": "enumeration", "enum": [ [""] ] } }
Example of partial update for value variants.
{ "moduleId": "rpa", "id": 170, "field": { "userTypeId": "enumeration", "enum": [ { "id": 29, }, { "id": 30, "value": "Updated value" }, { "value": "New value" } ] } }
In this example:
- value variant with id=29 remains unchanged,
- value variant with id=30 changes value
- adds new "New value" variant
- all the rest of variants will be deleted
© «Bitrix24», 2001-2024