Select user field in custom dialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • minhnv
    Junior Member
    • Dec 2023
    • 2

    Select user field in custom dialog

    Following example:
    ```

    ```
    but I changed to
    ```
    // define fields
    this.formModel.setDefs({
    fields: {
    'someString': {
    type: 'link', // field type
    view: 'views/fields/user', // optional, to define custom view
    required: true, // field param
    },
    'someCheckbox': {
    type: 'bool',
    },
    }
    });​
    ```
    but I got an error `Uncaught (in promise) TypeError: Cannot read properties of null (reading 'indexOf')` when selecting user.

    so, how can I use `views/fields/user` on custom dialog.

    Thanks

  • yuri
    Member
    • Mar 2014
    • 8627

    #2
    Also add:

    entity: 'User'
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • minhnv
      Junior Member
      • Dec 2023
      • 2

      #3
      Originally posted by yuri
      Also add:

      entity: 'User'
      Thank sir, I am missing "links" attribute also.

      Comment

      Working...