Functions
#
fetch() → {array}
Fetch Users
Users object array
Example
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
Example
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
Example
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
Example
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
Example
var response = ZDK.Apps.CRM.Users.deleteById("423383000005261048");