Documentation

BX24.selectCRM

BX24.selectCRM({
   entityType: Array value,
   multiple: true,
   value: Array value
})

Call of a CRM entity selection system dialog box.

Parameter Description
entityType Which types of objects to be displayed in a dialog box. The following value variants are:
  • lead - leads
  • contact - contacts
  • company - companies
  • deal - deals
  • quote - quotes
multiple Option to select multiple objects. By default- false.
value Which objects to be added already selected in the dialog box. Works only if multiple = true.

The following is returned to the handler:

{
    "lead": [
        {
            "id": "L_1348",
            "type": "lead",
            "place": "lead",
            "title": "Minty guest №2 - Bitrix24 Open Channel",
            "desc": "Guest",
            "url": "/crm/lead/show/1348/"
        }
    ],
    "contact": [
        {
            "id": "C_2",
            "type": "contact",
            "place": "contact",
            "title": "Smith John",
            "desc": "",
            "url": "/crm/contact/show/2/",
            "image": "/upload/resize_cache/crm/8b5/25_25_2/MM35_PG13.jpg"
        }
    ],
    "company": [],
    "deal": [],
    "quote": []
}

Examples

BX24.selectCRM({
   entityType: ['lead', 'contact', 'company', 'deal', 'quote'],
   multiple: true,
   value: {lead:[1348,2,35], contact:[2], company:[4,3], deal:[1,2], quote:[1]}
}, function(){
   console.log(arguments);
})

BX24.selectCRM({
   entityType: ['lead', 'contact', 'company', 'deal', 'quote'],
   multiple: true,
   value: ['L_1348', 'L_2', 'L_35', 'C_2', 'CO_4', 'CO_3', 'D_1', 'D_2', 'Q_1']
}, function(){
   console.log(arguments);
})

BX24.selectCRM({
   entityType: ['lead', 'contact', 'company', 'deal', 'quote'],
   multiple: false,
   value: ['L_35']
}, function(){
   console.log(arguments);
})

© «Bitrix24», 2001-2024
Up