List

Class representing a List in a Page.

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

SampleCopycopied

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

SampleCopycopied

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

SampleCopycopied

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

SampleCopycopied

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

Select Records by criteriaCopycopied

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

Select Records by record IDCopycopied

ZDK.Page.getList().selectRecordsByID(["111111000000000812", "111111000000000834", "111111000000000845"]);

# List Page (Standard)

clearSelection()

Clear selected Records in the List view

Example

Clear Select recordsCopycopied

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.
Supported options - backgroundColor

field Object

To add field level stylings.
Supported options - backgroundColor, fontWeight, foregroundColor

criteria String

criteria based on which records should be selected

Examples

Style records on criteriaCopycopied

ZDK.Page.getList().style(
		{
			record: {backgroundColor: '#ff0000'},
			field: {Email: {foregroundColor: '#ff0000', fontWeight: 'bold'}}
		},
		"((Last_Name:equals:Burns)and(First_Name:starts_with:M))"
);

Remove Style on recordsCopycopied

ZDK.Page.getList().style(
				{record: {}, field: {}},
				"((Last_Name:equals:Burns)and(First_Name:starts_with:M))"
);