Functions
# List Page (Standard)
freezeColumns(option)
Freeze list view and disable from modifying columns in list
Parameters:
Name | Type | Description |
---|---|---|
option |
Boolean | freeze option true/false |
Example
ZDK.Page.getList().freezeColumns(true);
# List Page (Standard)
maskField(field_name, config)
Mask fields in the List View
Parameters:
Name | Type | Description |
---|---|---|
field_name |
String | Api Name of field |
config |
Object | masking configuration |
length |
Number | length of charcters to be masked |
character |
Char | character to be used for masking |
reverse |
Boolean | masking to be done in reverse (true/false) |
Example
ZDK.Page.getList().maskField("Email", {length: 8, character: '#', reverse: true});
# List Page (Standard)
sortByField(field_name, option)
Sort field in the List View
Parameters:
Name | Type | Description |
---|---|---|
field_name |
String | Api Name of field |
option |
String | sort option {asc | desc | unsort} |
Example
ZDK.Page.getList().sortByField("Email", "asc");
# List Page (Standard)
getRecords()
Get Records in the List View
$selected property denoted if respective records is selected or not
Example
ZDK.Page.getList().getRecords();
# List Page (Standard)
selectRecords(criteria)
Select Records in the List view by criteria
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
criteria |
String |
<optional> |
criteria based on which records should be selected. Fields that are in the list are only available for criteria. |
Example
ZDK.Page.getList().selectRecords("((Last_Name:equals:Burns)and(First_Name:starts_with:M))");
# List Page (Standard)
selectRecordsByID(ids)
Select Records in the List view by record ID
Parameters:
Name | Type | Description |
---|---|---|
ids |
Array.<String> | array of record ids |
Example
ZDK.Page.getList().selectRecordsByID(["111111000000000812", "111111000000000834", "111111000000000845"]);
# List Page (Standard)
clearSelection()
Clear selected Records in the List view
Example
ZDK.Page.getList().clearSelection();
# List Page (Standard)
style(style_config, criteria)
Style Records in the List View
Parameters:
Name | Type | Description |
---|---|---|
style_config |
String | style_config to be added to the records |
record |
Object | To add record level stylings. |
field |
Object | To add field level stylings. |
criteria |
String | criteria based on which records should be selected |
Examples
ZDK.Page.getList().style(
{
record: {backgroundColor: '#ff0000'},
field: {Email: {foregroundColor: '#ff0000', fontWeight: 'bold'}}
},
"((Last_Name:equals:Burns)and(First_Name:starts_with:M))"
);
ZDK.Page.getList().style(
{record: {}, field: {}},
"((Last_Name:equals:Burns)and(First_Name:starts_with:M))"
);