Announcement

Collapse
No announcement yet.

export or merge contacts to distribution list by attribute

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • export or merge contacts to distribution list by attribute

    Hi,
    I`m currently looking for a solution for exporting all contact with a static contact-attribute.
    I already have a script for exporting all contacts from a contact folder into a csv file, which I use for importing them into our telephone system. But now I`m looking for http api commands to export all user out of one folder with two attributes.
    For example: All user from public contact with a optional field 13 = yes and optional field 14 = yes
    Maybe this is possible with the ajax advanced search.
    Is it also possible to merge them directly into a distribution list?

  • #2
    You can use the advanced search:
    Code:
    require(['io.ox/core/http']).done(function (http) {
        http.PUT({
            module: 'contacts',
            params: {
                action: 'advancedSearch',
                columns: '1,20,501,502' // add anything you need here
            },
            data: {
                filter: ['=', { field: 'userfield13' }, 'yes']
            }
        }).done(function (data) {
            console.log(data); // process data
        });
    });

    Comment

    Working...
    X