Taha El alami
Kilo Sage
Kilo Sage

Hi All ,

Recently, I had the opportunity to explore ServiceNow's extension points, and I found them to be an invaluable functionality. In this article, I'll share my experience detailing how extension points effectively addressed my specific needs, offering a tailored solution within the ServiceNow platform.

Introduction:

  • Extension points in ServiceNow used to extend the functionality of an application without altering the original application code. we can use pre-existing extension points OOB, or we can add extension points when we develop custom elements.
  • Extension points can prevent our custom code interactions from breaking, which often occurs after an upgrade if we directly embed the custom code into the application code.

Extension points in Customer Service Management

  • The Customer Service with Service Management plugin (com.sn_cs_sm) adds list of extension point, which exposes generic functions that are used for Case to (Incident, Problem,Change,Request) integrations.
  • CSMIncidentIntegrations
  • CSMChangeIntegrations
  • CSMProblemIntegrations
  • CSMRequestIntegrations
  • Extension points are stored in the Extension Point [sys_extension_point] table.
  • To modify the logic of those integrations we need to:
  • Create an implementation of an extension point.
  • Make the necessary changes in the implementation.
  • Update the order of the implementation to a lower number. The system executes the implementation with the lowest order number.

Function names used in the implementation must remain the same, otherwise the extension point will not be able to identify the implementation and will result in an error.

 

 

 

USE CASE:

For example, when creating an Incident from a Case by clicking on the 'Create Incident' UI action from the context menu, only certain fields are copied across from incident to case. the mapping logic from case to incident controlled by the script include CSMIncidentIntegrations, this item is read-only.

In this case we can use the Extension point to override the Read Only Script Include.

On the OOB behavior only the following fields are mapped by default

CASE

INCIDENT

Short description

Short description

Default impact

Impact

Urgency

Urgency

Contact

Caller

Configuration item (if available)

Configuration item

 

In our case we need to add the new mapping for (impact, urgency , service) fields :

To prevent duplicating all the read only elements called on the UI action we can just override the Read Only Script Include as per above by editing the Extension Point as below:

  1. Open the Extension Point:  CSMIncidentIntegrations

TahaElalami_0-1708190939808.png   2. Override Only the Function copyFieldsFromCaseToIncident

  • Add the desired changes without changing the function name.TahaElalami_1-1708191057592.png3. Click the "Create Implementation" Related Link  : Automatically the system will create :
    • New Extension point instance
    • New implementation
    • New Script Include is created which will override the Out of Box functionality.

4. The extension instance implementation with higher order number would overwrite the one with lower order number.

 

Thanks.

Taha Elalami : Servicenow Consultant

LinkedIn 

 

Comments
Mudabir
Tera Contributor

@Taha El alami 
Function in both implementations (OOB and custom) gets executed. Can we restrict it to custom one only?

Version history
Last update:
‎02-17-2024 09:46 AM
Updated by:
Contributors