rbf_getviewdef()
Purpose
This function retrieves the full metadata definition of a view as set in the platform. The metadata shows the server-side view setup and helps client components build list or grid interfaces dynamically without hardcoding layout or behavior.
The metadata includes:
-
View ID and visibility settings
-
Selected columns with field IDs, labels, data types, and display order
-
Grouping setup
-
Sorting configuration in sequence
-
Aggregation (totals) setup
-
Subtotal and total visibility flags
-
Structured filters with logical grouping (AND / OR)
-
Audit info (last updated time and user)
The response matches the exact configuration stored, preserving sorting, grouping, totals, and filter order as defined. This method returns metadata only, not record data. It enforces role-based access control, ensuring the user has permission to access the view before returning metadata.
Syntax
rbf_getViewDef(objDefName, viewDefName, callback, errorCallback, options);
Parameters
objDefName
The integration name of the object definition.
viewDefName
The integration name of the view definition.
callback
The callback function will receive an error message as the first parameter and the API name (which caused the error) as the second parameter.
errorCallback
An optional parameter to receive an error message as the first argument. If you do not specify this parameter in the method call, the callback defined by rbf_setErrorsCallback(callback) is invoked to receive the error message.
options
An optional JSON object that sets the values of optional arguments. The properties that this object can take are as follows:
useISODateFormatto get the date or date/time values in ISO format, for example,{"useISODateFormat":true}.- If the date and time value is
Mon Jul 30 00:01:00 IST 2018its equivalent ISO formatted value2018-07-29T18:31:00Z-is returned. - If the date value is
Mon Jul 30 2018, its equivalent ISO formatted value2018-07-30is returned.
The response payload format matches the requested output type: JSON inputs produce JSON responses, XML inputs produce XML responses, and XML is the default if unspecified.
- If the date and time value is
Example
This example retrieves the metadata definition of the view with integration name view_1 for the object GCObj1. The response returns in JSON format and logs to the console.
{"orderNo": 0,
"name": "All GCObj1s",
"integrationName": "view_1",
"hideFromViewSelector": false,
"hideCounter": false,
"isPrivate": false,
"usedInSearch": false,
"showInDesktop": true,
"showInTablet": true,
"showInSmartPhone": true,
"id": 224947218,
"originalId": "SJKnVVn_QNiHSj60mTjFRg",
"createdBy": 224947167,
"updatedBy": 224947167,
"createdAt": "2025-09-19T10:40:41Z",
"updatedAt": "2026-02-23T18:21:20Z",
"columns": [
"name",
"updatedAt",
"updatedBy",
"Age_Updated",
"FileUploadField",
"email",
"NDTFld",
"MultiSelectFld"
],
"showActions": true,
"sortingAndGrouping": {"groupBy": {"index": -1,
"fieldIntegrationName": "",
"ascending": true
},
"sortBy": [
{"index": 0,
"fieldIntegrationName": "updatedAt",
"ascending": false
}
],
"disableDynamicSorting": false
},
"totalAndSubtotals": {"totals": [
],
"hideSubTotal": false,
"hidePageTotal": false,
"hideGrandTotal": false
},
"viewFilters": {"filters": [
{"index": 0,
"fieldIntegrationName": "createdAt",
"opCode": "LT",
"opValue": "2025-10-08T18:30:00Z",
"dataType": "GENERAL"
}
],
"joinType": "AND",
"expression": "",
"formula": ""
}
}