Button

Class representing a Button in a Page.

Functions

#

getId() → {String}

Get the id of button

id

String
Examples

SampleCopycopied

var buttonObj = ZDK.Page.getButtons();
buttonObj[0].getId();

Output

1101122131

#

getType() → {String}

Get the type of button

type

String
Examples

SampleCopycopied

var buttonObj = ZDK.Page.getButtons();
buttonObj[0].getType();

Output

system or custom

#

getLabel() → {String}

Get the name of button

name

String
Examples

SampleCopycopied

var buttonObj = ZDK.Page.getButtons();
buttonObj[0].getLabel();

Output

Save

#

getApiName() → {String}

Get the API name of button

api_name

String
Examples

SampleCopycopied

var save_btn = ZDK.Page.getButton('record_save');
save_btn.getApiName();

Output

record_save

#

click()

Initiate button click event

Example

SampleCopycopied

var save_btn = ZDK.Page.getButton('record_save');
save_btn.click();

#

disable()

Disable the button

Example

SampleCopycopied

var save_btn = ZDK.Page.getButton('record_save');
save_btn.disable();

#

enable()

Enable the button

Example

SampleCopycopied

var save_btn = ZDK.Page.getButton('record_save');
save_btn.enable();

#

setLabel(label)

Set label for the button

Parameters:
Name Type Description
label String

Button label

Example

SampleCopycopied

var save_btn = ZDK.Page.getButton('record_save');
save_btn.setLabel('Approve & Save');