Skip to content

Custom View Service

Get Current View Information

javascript
customViewService.getTableView();

Return Value Promise<TableView>

javascript
customViewService.getTableView().then(tableView => {
    console.log(tableView);
});

Get Data List of Current View

javascript
customViewService.getRecordList();

Return Value Promise<List<Record>>

javascript
customViewService.getRecordList().then(list => {
    console.log(list);
});

Get Data Count of Current View

javascript
customViewService.getRecordCount();

Return Value Promise<Number>

javascript
customViewService.getRecordCount().then(count => {
    console.log(count);
});

Modify Sorting Information of Current View

javascript
customViewService.changeOrderBy(orderByList);
ParameterTypeDescription
orderByListArraySorting information list, optional. Not passing or passing an empty array will reset sorting

Return Value Promise<any>

Modify Pagination Information of Current View

javascript
customViewService.changePagination(pagination);
ParameterTypeDescription
pageIndexNumberPage number (starting from 1)
pageSizeNumberNumber of records per page

Return Value Promise<any>

javascript
customViewService.changePagination({
    pageIndex: 2,
    pageSize: 50,
});

Get Data Table Information of Current View

javascript
customViewService.getTableInfo();

Return Value Promise<TableInfo>

javascript
customViewService.getTableInfo().then(tableInfo => {
    console.log(tableInfo);
});

Open Record Detail Page

javascript
customViewService.openRecord(recordId);
ParameterTypeDescription
recordIdStringRecord ID
javascript
customViewService.openRecord('s99ddf34fcverf');

Reload Current View Data, Will Reset View Pagination Data

javascript
customViewService.reload();

Refresh Current View Data, Will Not Reset View Pagination Data

javascript
customViewService.refresh();

Set Selected Record ID List of Current View

javascript
customViewService.setSelectedRecordIdList(idList);
ParameterTypeDescription
idListList<String>List of selected record IDs
javascript
customViewService.setSelectedRecordIdList(['s99ddf34fcverf']);

Set Context Menu Record of Current View

javascript
customViewService.setContextMenuRecordId(recordId);
ParameterTypeDescription
recordIdStringRecord ID
javascript
customViewService.setContextMenuRecordId('s99ddf34fcverf');