Users

Functions

#

fetch() → {array}

Fetch Users

Users object array

array
Example

SampleCopycopied

var users = ZDK.Apps.CRM.Users.fetch();
users[0].last_name;

#

fetchById(id) → {Users}

Fetch User By Id

Parameters:
Name Type Description
id String

record_id

object

Users
Example

SampleCopycopied

var user = ZDK.Apps.CRM.Users.fetchById("423383000005261048");
user.last_name;

#

create(arrayOfObjects) → {array}

Create User

Parameters:
Name Type Description
arrayOfObjects Array.<Users>

users object array or a single object

CRMResponses object array

array
Example

Create UserCopycopied

var user = new ZDK.Apps.CRM.Users.Models.Users();
user.first_name = "Patricia";
user.last_name = "Boyle";
user.email = "Patricia@abcl.com";
user.profile = "423383000005261067";
user.role = "633283000009061021";
var response = ZDK.Apps.CRM.Users.create(user);

#

update(arrayOfObjects) → {array}

Update User

Parameters:
Name Type Description
arrayOfObjects Array.<Users>

users object array or a single object

CRMResponses object array

array
Example

Update Multiple RecordsCopycopied

var user = ZDK.Apps.CRM.Users.fetchById("423383000005261048");
user.last_name = "Updated Name";
var response = ZDK.Apps.CRM.Users.update(user);

#

deleteById(id) → {array}

Delete User By Id

Parameters:
Name Type Description
id String

record_id

CRMResponses object array

array
Example

SampleCopycopied

var response = ZDK.Apps.CRM.Users.deleteById("423383000005261048");