Change Sort Order of Custom Views
Purpose
To change the sort order of records in a custom view.
Request Details
Request URL
{api-domain}/crm/{version}/settings/custom_views/{cv-id}/actions/change_sort?module={module_name}
For multiple custom views:
{api-domain}/crm/{version}/settings/custom_views/actions/change_sort?module={module_name}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.custom_views.{operation_type}
(or)
scope=ZohoCRM.settings.ALL
Possible operation types
ALL - Full access to custom views module
UPDATE - Update custom views
Parameters
- modulestring, mandatory
Specify the module API name. Use the GET Module Metadata API to get the module API names.
Input JSON Keys
- sort_byJSON object, mandatory
The api name and id of the field by which you want to sort the records.
- sort_orderstring, mandatory
The order by which you want to sort the records. The possible values are :
asc : ascending order
desc : descending order
Note
You can update up to 100 custom views in a single API call.
Sample Request to sort a single Custom View
Copied
Sample Input
Copied
Sample Response
Copied
Possible Errors
- INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have the required OAUTH SCOPE. Create a new client with valid scope. Refer to scope section above for more details. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team. - INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above. - INVALID_DATAHTTP 400
invalid data
Resolution: Specify a valid custom view ID in the request URL, and valid API name and ID for the sort_by key. Check if you have given the correct value for the sort_order key. - INVALID_MODULEHTTP 400
The module name given seems to be invalid
Resolution: Specify a valid module name in the request URL. - MANDATORY_NOT_FOUNDHTTP 400
Required field not found
Resolution: You have not specified a mandatory key in the input body. Specify all the mandatory keys.
Sample Request for multiple Custom Views
Copied
Sample Input for multiple Custom Views
Copied
Sample Output for multiple Custom Views
Copied