Documentation

userfieldtype.add

Registration of new type of user fields. This method returns true or an error with description.

Parameters

Parameter Type DescriptionLimitations
USER_TYPE_ID Line Inline code of the type. Required parameter.a-z0-9
HANDLER URL Address of user type handler. Required parameter.Shall be in the same domain as the application main address.
TITLE Line Type text name. Will be displayed in the admin interface of user field settings.
DESCRIPTION Line Type text description. Will be displayed in the admin interface of user field settings.

Examples

Call example

BX24.callMethod(
   'userfieldtype.add', 
   {
      USER_TYPE_ID: 'test',
      HANDLER: 'https://www.myapplication.com/handler/',
      TITLE: 'Test type',
      DESCRIPTION: 'Test userfield type for documentation'
   }
);

Request example

POST https://sometestportal.bitrix24.com/rest/userfieldtype.add HTTP/1.1

USER_TYPE_ID=test&HANDLER=https%3A%2F%2Fwww.myapplication.com%2Fhandler%2F&TITLE=Test+type&DESCRIPTION=Test+userfield+type+for+documentation&auth=63t6r4z9cugaciaxocrh2r47zlodp12y

HTTP/1.1 200 OK

{
    "result": true
}

© «Bitrix24», 2001-2022
Up