Notifications

15 views

Description

Parameter with name "id" for new processors break global processors on Service Portal.

Steps to Reproduce

I reproduce this issue on my OOTB instance empjgu1 Kingston Patch 7.

  1. Log in as admin
  2. Navigate to 'sys_processor.do'.
  3. Create a new Processor
    • name: testbyServicenow
    • Type: script
    • Active: true
    • Parameters: id
    • Path: testbyServicenow
    • Script:
       (function process(g_request, g_response, g_processor) {
      // Add your code here
      gs.log("Inside the SERVICENOW Test sys processor: " + g_request.getParameter('id'));
      })(g_request, g_response, g_processor);
  4. Access to record in Service Portal via URL.

For example, use the following link to access OOTB Widget editor of SC Order Guide.

https://empjgu1.service-now.com/sp_config?id=widget_editor&sys_id=480ca054db03320064301150f0b8f545

Use the following link access 'ticket' page view 'sc_req_item'.

https://empjgu1.service-now.com/sp?id=ticket&table=sc_req_item&sys_id=de31d389db3b134004486f048a961909&view=sp

These pages can be accessed as desired if we remove Parameters id from the created Processor.

Expected behavior: The record page can be accessed via URL.
Actual behavior: The record page is blank if accessed via URL.

Workaround

Processor parameter matching is extremely powerful, so generic parameter names must be avoided. e.g., if you chose to add "sys_id" as a parameter to a Processor, you'd break much of your instance.

Is it not practical for us to change the "id" parameter for Service Portal page target at this point, unfortunately. Custom Processor parameters should be made as specific as possible to avoid conflict with OOB functionality. Parameters like table, sys_id, id, view, etc. will take control of any URL that uses them and should be avoided.

The following is a list of parameters names which are used by the Service Portal, and therefore cannot be when creating a new processor:

  • id
  • table
  • t
  • sys_id
  • view
  • kb_id
  • kb_category
  • catalog_id
  • sysparm_category
  • service
  • sort

Using one of these parameters names will cause a blank screen when trying to access the service portal.


Related Problem: PRB1297982

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:41:32
Published:2019-03-03