Functions
#
fetchTags(api_name) → {array}
Fetch Tags
Parameters:
Name | Type | Description |
---|---|---|
api_name |
String | of the module |
Tags object array
Example
var tags = ZDK.Apps.CRM.Settings.fetchTags("Leads");
for(var i = 0; i < tags.length; i++){
log(tags[i].name);
}
#
createTags(arrayOfObjects, api_name) → {array}
Create Tags
Parameters:
Name | Type | Description |
---|---|---|
arrayOfObjects |
Array.<Tags> | tags object array or a single object |
api_name |
String | of the module |
CRMResponses object array
Example
var tag = new ZDK.Apps.CRM.Settings.Models.Tags();
tag.name = "important";
var response = ZDK.Apps.CRM.Settings.createTags(tag, "Leads");
#
updateTags(arrayOfObjects, api_name) → {array}
Update Tags
Parameters:
Name | Type | Description |
---|---|---|
arrayOfObjects |
Array.<Tags> | tags object array or a single object |
api_name |
String | of the module |
CRMResponses object array
Examples
var tags = ZDK.Apps.CRM.Settings.fetchTags("Leads");
tags[0].name = "important";
var response = ZDK.Apps.CRM.Settings.updateTags(tags[0], "Leads");
var tags = ZDK.Apps.CRM.Settings.fetchTags("Leads");
tags[0].name = "important";
tags[1].name = "noted";
var response = ZDK.Apps.CRM.Settings.updateTags([tags[0] ,tags[1]], "Leads");
#
updateTagsById(Object, tag_id, api_name) → {array}
Update Tag By Id
Parameters:
Name | Type | Description |
---|---|---|
Object |
Tags | tags object |
tag_id |
String | id of the tag |
api_name |
String | of the module |
CRMResponses object array
Example
var tags = ZDK.Apps.CRM.Settings.fetchTags("Leads");
tags[0].name = "important";
var response = ZDK.Apps.CRM.Settings.updateTagsById(tags[0], tags[0].id, "Leads");
#
deleteTagsById(tag_id, api_name) → {array}
Delete Tag
Parameters:
Name | Type | Description |
---|---|---|
tag_id |
String | id of the tag |
api_name |
String | of the module |
CRMResponses object array
Example
var response = ZDK.Apps.CRM.Settings.deleteTagsById("4233861048", "Leads");
#
fetchTagsCount(tag_id, api_name) → {number}
Tag Count
To get the total number of records under a tag
Parameters:
Name | Type | Description |
---|---|---|
tag_id |
String | id of the tag |
api_name |
String | of the module |
count
Example
var count = ZDK.Apps.CRM.Settings.fetchTagsCount("423383000005261048", "Leads");
#
mergeTags(conflicting_tag_id, tag_id) → {array}
Update Tags
To merge tags and put all records in those tags into a single tag
Parameters:
Name | Type | Description |
---|---|---|
conflicting_tag_id |
String | conflicting tag id |
tag_id |
String | id of the tag |
CRMResponses object array
Example
var response = ZDK.Apps.CRM.Settings.mergeTags("423383000005261087", "423383000005261079");
#
fetchRoles() → {array}
Fetch Roles
Roles object array
Example
var roles = ZDK.Apps.CRM.Settings.fetchRoles();
for(var i = 0; i < roles.length; i++){
log(roles[i].name);
}
#
fetchRolesById(id) → {Roles}
Fetch Roles By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object
Example
var role = ZDK.Apps.CRM.Settings.fetchRolesById("423383000000015966");
log(role.name);
#
fetchProfiles() → {array}
Fetch Profiles
Profiles object array
Example
var profiles = ZDK.Apps.CRM.Settings.fetchProfiles();
for(var i = 0; i < profiles.length; i++){
log(profiles[i].name);
}
#
fetchProfilesById(id) → {Profiles}
Fetch Profiles By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object
Example
var profile = ZDK.Apps.CRM.Settings.fetchProfilesById("423383000000015966");
log(profile.name);
#
fetchTerritories() → {array}
Fetch Territories
Territories object array
Example
var territories = ZDK.Apps.CRM.Settings.fetchTerritories();
for(var i = 0; i < territories.length; i++){
log(territories[i].name);
}
#
fetchAllModules() → {array}
Fetch Modules
Modules object array
Example
var modules = ZDK.Apps.CRM.Settings.fetchAllModules();
for(var i = 0; i < modules.length; i++){
log(modules[i].api_name);
}
#
fetchFields(module_name) → {array}
Fetch Fields
Parameters:
Name | Type | Description |
---|---|---|
module_name |
String | api_name of the module |
Fields object array
Example
var fields = ZDK.Apps.CRM.Settings.fetchFields("Leads");
for(var i = 0; i < fields.length; i++){
log(fields[i].api_name);
}
#
fetchLayouts(module_name) → {array}
Fetch Layouts
Parameters:
Name | Type | Description |
---|---|---|
module_name |
String | api_name of the module |
Layouts object array
Example
var layouts = ZDK.Apps.CRM.Settings.fetchLayouts("Leads");
for(var i = 0; i < layouts.length; i++){
log(layouts[i]);
}
#
fetchLayoutsById(id, module_name) → {Layouts}
Fetch Layouts By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
module_name |
String | api_name of the module |
object
Example
var layout = ZDK.Apps.CRM.Settings.fetchLayoutsById("423383000000015966", "Leads");
#
fetchRelatedLists(module_name) → {array}
Fetch RelatedLists
Parameters:
Name | Type | Description |
---|---|---|
module_name |
String | api_name of the module |
RelatedLists object array
Example
var related_lists = ZDK.Apps.CRM.Settings.fetchRelatedLists("Leads");
#
fetchCustomViews(module_name) → {array}
Fetch CustomViews
Parameters:
Name | Type | Description |
---|---|---|
module_name |
String | api_name of the module |
CustomViews object array
Example
var custom_views = ZDK.Apps.CRM.Settings.fetchCustomViews("Leads");
#
fetchCustomViewsById(id, module_name) → {CustomViews}
Fetch CustomViews By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
module_name |
String | api_name of the module |
object
Example
var custom_views = ZDK.Apps.CRM.Settings.fetchCustomViewsById("423383000000015966", "Leads");
#
fetchVariables() → {array}
Fetch Variables
Variables object array
Example
var variables = ZDK.Apps.CRM.Settings.fetchVariables();
#
fetchVariablesById(id) → {Variables}
Fetch Variables By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object
Example
var variable = ZDK.Apps.CRM.Settings.fetchVariablesById("423383000000015966");
#
deleteVariablesByIds(ids) → {array}
Delete Variables By Ids
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<String> | array of variable ids |
CRMResponses object array
Example
var ids = ["423383000005267523", "423383000005267521"];
var response = ZDK.Apps.CRM.Settings.deleteVariablesByIds(ids);
#
deleteVariablesById(id) → {CRMResponses}
Delete Variables By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object
Example
var response = ZDK.Apps.CRM.Settings.deleteVariablesById("423383000000015966");
#
createVariables(array_of_variable_objects) → {array}
Delete Variables By Ids
Parameters:
Name | Type | Description |
---|---|---|
array_of_variable_objects |
Array.<Variables> | array or a single variable object |
CRMResponses object array
Example
var variable = new ZDK.Apps.CRM.Settings.Models.Variables();
variable.api_name = "Variable101";
variable.name = "Variable101";
variable.value = "Hello";
variable.type = "text";
variable.variable_group = {"name": "General"};
var response = ZDK.Apps.CRM.Settings.createVariables([variable]);
#
updateVariables(array_of_variable_objects) → {array}
Update Variables
Parameters:
Name | Type | Description |
---|---|---|
array_of_variable_objects |
Array.<Variables> | array or a single variable object |
CRMResponses object array
Example
var variable = ZDK.Apps.CRM.Settings.fetchVariablesById("423383000000015966");
variable.name = "tax_rate";
var response = ZDK.Apps.CRM.Settings.updateVariables([variable]);
#
updateVariablesById(id, object) → {CRMResponses}
Update Variables By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object |
Variables | variables object |
object
Example
var variable = ZDK.Apps.CRM.Settings.fetchVariablesById("423383000000015966");
variable.name = "tax_rate";
var response = ZDK.Apps.CRM.Settings.updateVariablesById("423383000000015966", variable);
#
fetchVariableGroups(group_name_or_id) → {array}
Fetch Variable Groups
Parameters:
Name | Type | Description |
---|---|---|
group_name_or_id |
String | variable_group_name (or) variable_group_id |
Variable_Groups object array
Example
var variablesGroups = ZDK.Apps.CRM.Settings.fetchVariableGroups("general");
#
fetchAssignmentRules() → {array}
Fetch Assignment Rules
Assignment_Rules object array
Example
var assignment_rules = ZDK.Apps.CRM.Settings.fetchAssignmentRules();
#
fetchAssignmentRulesByModule(module) → {Assignment_Rules}
Fetch Assignment Rules By Module
Parameters:
Name | Type | Description |
---|---|---|
module |
String | module |
object
Example
var assignment_rules = ZDK.Apps.CRM.Settings.fetchAssignmentRulesByModule("Leads");
#
fetchApprovalProcess() → {array}
Fetch Approval Process
Approvel_Process object array
Example
var approval_process = ZDK.Apps.CRM.Settings.fetchApprovalProcess();
#
fetchApprovalProcessById(id) → {Approvel_Process}
Fetch Approval Process By Id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | id |
object
Example
var approval_process = ZDK.Apps.CRM.Settings.fetchApprovalProcessById("423383000000015966");