Documentation

Field Visibility Settings

Scope: catalog Permissions: all

Set of methods for handling field visibility settings

You can find more details in RPA documentation.

Additionally to user fields, system field visibility can be managed in the kanban details form.

System fields has the following codes:

  • id - item id
  • createdBy - who created
  • updatedBy - who modified
  • movedBy - who changed stage
  • createdTime - time of creation
  • updatedTime - time of update
  • movedTime - time when stage changed

rpa.fields.*

Method Description Available from version
rpa.fields.getSettings({typeId: number, stageId: ?number}) Method returns full set of field visibility settings at the stage with ID stageId of process with ID typeId. Parameters:
  • typeId - process ID
  • stageId - stage ID. Optional field, zero by default (general settings)

Example of response

{
    "fields": {
        "kanban": {
            "id": true,
            "UF_RPA_1_NAME": true
        },
        "create": {
            "UF_RPA_1_NAME": true
        }    
    } 
}
rpa.fields.setSettings({typeId: number, fields: ?[], stageId: ?number}) Method sets a fun set of field visibility settings with ID stageId of process with ID typeId. Parameters:
  • typeId - process ID
  • stageId - stage ID. Optional field, zero by default (general settings)
  • fields - array with field visibility settings

When empty fields is passed, all settings will be erased

Example of query

{
    "typeId": 1,
    "fields": {
        "kanban": [
            "createdBy", 
            "UF_RPA_1_NAME"
        ]
    }
}
rpa.fields.setSettings({typeId: number, fields: ?[], stageId: ?number}) Method sets a full set of field visibility settings at the stage with ID stageId of process with ID typeId. Parameters:
  • typeId - process ID
  • stageId - stage ID. Optional field, zero by default (general settings)
  • fields - array with field visibility settings

When empty fields is passed, all settings will be erased

Example of query

{
    "typeId": 1,
    "fields": {
        "kanban": [
            "createdBy", 
            "UF_RPA_1_NAME"
        ]
    }
}

Method returns result similar to query rpa.fields.getSettings

rpa.fields.setVisibilitySettings({typeId: number, visibility: string, fields: ?[], stageId: ?number}) Method changes visibility settings for fields of the process with with ID typeId at the stage with ID stageId. The rest of settings are not changed during this procedure. Parameters:
  • typeId - process ID
  • visibility - visibility ID for which settings are changed
  • stageId - stage ID. Optional field, zero by default (general settings)
  • fields - array with fields for which settings must be updated

Method must be used when visibility settings must be changed only for one type

Example of query

{
    "typeId": 1,
    "visibility": "kanban",
    "fields": [
        "createdBy", 
        "UF_RPA_1_NAME"
    ]
}

Method returns result similar to the query rpa.fields.getSettings

© «Bitrix24», 2001-2024
Up