'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

                    • 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 ...
                    • Link Support for Zia Bot Message View Custom Function

                      Issue: Unable to show link in Zia Bot using Zia Bot's Custom Function (Message View) Fix: Link Support Provided Ex: Custom Function deluge Code: return {"display_message": "[Test Link](https://www.google.com)"}; Compatible only for 14500 ...
                    • 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 ...
                    • Script to automatically assign a technician to an unassigned request based on the first response

                      When a technician responds to an unassigned request, the corresponding ticket will be automatically assigned to the specific technician. Tested in: Build 14306 (Postgres) Steps: Download the attached scripts. Under Admin > Developer Space > Global ...
                    • Zia-prerequisites

                      Dear Users, From Supportcenter Plus 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 ...