
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2020 09:49 AM
Hi all,
I have the requirement to extend the mapping of fields copied from case to an Incident when I creating it from the case.
So I have tried to edit the extension point "CSMIncidentIntegrations" thinking that it will be used as an extension of the Script include, but it not work...
...could someone help me to understand how the extension point work?
My idea:
The UI Action trigger:
new sn_cs_sm.ServiceManagementIncidentUtils().createIncidentFromCase(current, action);
The "ServiceManagementIncidentUtils" contains "getExtensions" :
createIncidentFromCase: function(caseGr, uiActionHandler) {
var incGr = new GlideRecord("incident");
var ep = new GlideScriptedExtensionPoint().getExtensions(ServiceManagementIntegrationConstants.CASE_INC_EXTENSION_POINT);
//If there is any other new extension instance other than the OOB one, concat them together
//The extension instance with higher order number would overwrite the one with lower order number
for(var i = 0; i < ep.length; i ++){
var point = ep[i];
point.copyFieldsFromCaseToIncident(incGr, caseGr);
}
var incSysId = incGr.insert();
caseGr.incident = incSysId;
caseGr.update();
gs.addInfoMessage(gs.getMessage("Incident {0} created", incGr.number));
uiActionHandler.openGlideRecord(incGr);
uiActionHandler.setReturnURL(caseGr);
},
in the Extension Point of "CSMIncidentIntegrations", in function "copyFieldsFromCaseToIncident" I have added:
copyFieldsFromCaseToIncident: function(incGr, caseGr) {
incGr.description = caseGr.description;
},
But the system doesn't map the field...
..I have tried also to add gs.info ('------GO------');
But I haven't found anything in the LOG...
...could someone help me to understand how the extension point work?
Best Regards
Vincenzo\
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 10:29 AM
Hi,
I have found why my Extension Point are not triggered by the system...
...the problem was that for active on the system the Extension Point, you need to click the link "Create Impementation"
Now it work correctly.
Best Regards
Vincenzo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 04:59 AM
I have currently no instance with CSM. Did you change the function in the extension point directly (Field Example)?
You have to change the Implementation part (related list on extension point). This is an Script Include.
If the script include is protected you have to copy the Script Include, deactivate the old extension point implementation and create a new one.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 05:36 AM
Hello,
An option here is to start debugging, to be able to see whats not working as you expect.
Have you looked into this one : Using extension points to extend application functionality ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 10:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2020 12:10 PM
Hey @Vincenzo,
Did you tried to first create the implementation, and then configure the script include being created? or did you just modified the extension point first and then created the implementation?