'row_count' in API input data of Zia Bot Custom Actions script is getting removed

'row_count' in API input data of Zia Bot Custom Actions script is getting removed

Issue:
Below script is used in the Zia Bot custom Actions to view the last five requests of that respective user. This is achieved by setting the row_count property in the input_data's list_info property of API. But in Zia Bot client handling, this row_count property will be removed, because of which all latest requests will be shown in the list view.

  1. input_data = {
  2.     "list_info": {
  3.         "row_count": 5,
  4.         "start_index": 1,
  5.         "sort_field": "id",
  6.         "sort_order": "desc",
  7.         "search_criteria": {
  8.             "field": "requester",
  9. "value": context.get("userInfo").get("id"),
  10.             "condition": "="
  11.         }
  12.     }
  13. };
  14. response = invokeurl
  15. [

  16. url: "<URL>/api/v3/requests"

  17. type: GET
  18. parameters: {"input_data":input_data}
  19. headers: {"TECHNICIAN_KEY":"<Tech Key>"}
  20. ];

  21. return response;
Fix:
The row_count will not be removed for Custom Actions showing list view as response.

Instructions:

-> Go to <Installation Directory>/ServiceDesk/webapps/ROOT/scripts folder.
-> Move the servicedesk.js and servicedesk_ember.js from that folder (as a Backup)
-> Download the attached files with fix and rename the file names by removing the _txt  in the file extension and move it to the same folder.
-> Now do a hard refresh and try checking the list view from Zia Bot. It show the expected data.

Compatibility:
SDP 14.7.60 version (14760)

Modified Files:
servicedesk.js
servicedesk_ember.js

                  New to ADSelfService Plus?