Querying A Root Business Component Using the recordneeded and Viewmode Parameters
The default value in the ViewMode parameter is Sales Rep, and any ViewMode queries fetch only the records which are accessible to the Sales Rep role. However, if you need to know the total number of records in the organization of the user accessing the records, you can change the value of the ViewMode parameter to Organization, in conjunction with recordcountneeded parameter. If you set this parameter to false, then no record count is returned. If neither true nor false is specified, then the default value for recordcountneeded is false.
- This parameter applies only to GET URLs of /data and /workspace APIs.
- The total record count returns as a response header named: Total-Record-Count
- Total record count gives count records to which you have access.
- It gives a record count of the last business component specified in the request URL.
- The best practice, to optimize performance, is to only use this parameter when a record count is required.
In the following request, the recordcountneeded parameter is set to true, and the ViewMode parameter is set to Organization. The response has a header named Total-Record-Count which indicates that there are 5707 records in the Account business component that match the query.
-
URI: http://ServerName:port/siebel/v1.0/data/Account/Account?recordcountneeded=true&ViewMode=Organization
-
HTTP Method: GET
-
Content-Type: application/json
-
Authorization: Basic
-
Total-Record-Count: 5707 (Response Header)