'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?

                    • Related Articles

                    • What is Data Archiving ?

                      Data Archiving is a process where requests will be moved to the archived state (archived requests) and will be removed from the active requests list. In the database perspective, It will be just moved from workorder table to arc_workorder table in ...
                    • Notification script using Custom function in custom trigger

                      This is applicable from 10600 builds. From 10600 , Business rules dont have Email notification feature. The same use case be achieved through Custom triggers feature as mentioned below. Script to enable notification of request creation using custom ...
                    • Deluge Script to show request attributes in Task Subject / Description from builds: 10600 and 14306

                      Requirement: To show the request field values such as Request Type, Status etc., or the additional field values in the Task subject/description. Use case: When a task is triggered from a request, it should contain the request details (configured) in ...
                    • Pre-define 'Email IDs to notify' with API

                      Email ids to notify can be pre-defined while adding through v1 API. The key is "interestedParty" for the same : Please check the below example : data={ "operation": { "details": { "subject": "Cannot browse", "description": "Unable to connect to the ...
                    • Zia-prerequisites

                      Dear Users, From ServiceDeskPlus MSP build 14300, if you are using Windows OS and, Visual C++ 2019 (or higher) Redistributable is not installed on your machine, Zia Approval / Request Reopen / Category & Template Prediction will be disabled by ...