- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 05:50 AM
Hi all,
Do any of you know what exactly the bellow instruction does?
spUIActionsExecuter.executeFormAction(ESIGNATURE.REJECT_SYS, "sysapproval_approver" , id, [] , "", requestParams).then(function(response) {});
I know this is going to show a pop-up in case the ESIGNATURE is necessary, but I would like to know how it works.
Thanks,
Solved! Go to Solution.
- Labels:
-
Multiple Versions
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 06:05 AM
<instance>.service-now.com/scripts/app.$sp/factory.spUIActionsExecuter.js
/*! RESOURCE: /scripts/app.$sp/factory.spUIActionsExecuter.js */
angular.module('sn.$sp').factory('spUIActionsExecuter', function($q, glideUIActionsApi, spModal, i18n, $http, spAuthentication, glideUserSession, cabrillo, $cookies, spAuthModal, spNotificationEvents) {
'use strict';
var NOW_REAUTHENTICATE_CODE = 'NOW.REAUTHENTICATE';
function executeListAction(actionSysId, tableName, recordSysId, requestParams) {
return execute(actionSysId, 'list', tableName, recordSysId, undefined, undefined, requestParams)
}
function executeFormAction(actionSysId, tableName, recordSysId, fields, encodedRecord, requestParams) {
return execute(actionSysId, 'form', tableName, recordSysId, fields, encodedRecord, requestParams);
}
function execute(actionSysId, type, tableName, recordSysId, fields, encodedRecord, requestParams) {
var $request = glideUIActionsApi.execute(
actionSysId,
type,
tableName,
recordSysId,
fields,
encodedRecord,
requestParams
);
return $request.then(function(response) {
var result = response.data.result,
username = requestParams.username,
userSysId = requestParams.userSysId;
return retrieveSessionMessages().then(function(sessionMessagesResponse) {
spNotificationEvents.addMessages(sessionMessagesResponse.data.result.$$uiNotification);
if(result.response_code === NOW_REAUTHENTICATE_CODE) {
return spAuthModal.prompt(requestParams, username, userSysId).then(function() {
spNotificationEvents.clearMessages();
if (!angular.isDefined(requestParams)) {
requestParams = {};
}
requestParams[NOW_REAUTHENTICATE_CODE] = userSysId;
return execute(
actionSysId,
type,
tableName,
recordSysId,
fields,
encodedRecord,
requestParams
);
}, function() {
console.error("Re-auth failed");
});
}
})
});
}
function retrieveSessionMessages() {
return $http({
method: 'GET',
url: '/api/now/sp/sessionuinotifications'
});
}
return {
executeListAction: executeListAction,
executeFormAction: executeFormAction
};
});
;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 06:05 AM
<instance>.service-now.com/scripts/app.$sp/factory.spUIActionsExecuter.js
/*! RESOURCE: /scripts/app.$sp/factory.spUIActionsExecuter.js */
angular.module('sn.$sp').factory('spUIActionsExecuter', function($q, glideUIActionsApi, spModal, i18n, $http, spAuthentication, glideUserSession, cabrillo, $cookies, spAuthModal, spNotificationEvents) {
'use strict';
var NOW_REAUTHENTICATE_CODE = 'NOW.REAUTHENTICATE';
function executeListAction(actionSysId, tableName, recordSysId, requestParams) {
return execute(actionSysId, 'list', tableName, recordSysId, undefined, undefined, requestParams)
}
function executeFormAction(actionSysId, tableName, recordSysId, fields, encodedRecord, requestParams) {
return execute(actionSysId, 'form', tableName, recordSysId, fields, encodedRecord, requestParams);
}
function execute(actionSysId, type, tableName, recordSysId, fields, encodedRecord, requestParams) {
var $request = glideUIActionsApi.execute(
actionSysId,
type,
tableName,
recordSysId,
fields,
encodedRecord,
requestParams
);
return $request.then(function(response) {
var result = response.data.result,
username = requestParams.username,
userSysId = requestParams.userSysId;
return retrieveSessionMessages().then(function(sessionMessagesResponse) {
spNotificationEvents.addMessages(sessionMessagesResponse.data.result.$$uiNotification);
if(result.response_code === NOW_REAUTHENTICATE_CODE) {
return spAuthModal.prompt(requestParams, username, userSysId).then(function() {
spNotificationEvents.clearMessages();
if (!angular.isDefined(requestParams)) {
requestParams = {};
}
requestParams[NOW_REAUTHENTICATE_CODE] = userSysId;
return execute(
actionSysId,
type,
tableName,
recordSysId,
fields,
encodedRecord,
requestParams
);
}, function() {
console.error("Re-auth failed");
});
}
})
});
}
function retrieveSessionMessages() {
return $http({
method: 'GET',
url: '/api/now/sp/sessionuinotifications'
});
}
return {
executeListAction: executeListAction,
executeFormAction: executeFormAction
};
});
;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2020 02:31 AM
Thanks! How did you find this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2020 12:12 AM
Hi Brian,
Many of these scripts can be found using the browser DevTools. I more than likely used Chrome at that time but you should be able to use Firefox or Edge/IE too.
From Chrome I do an Inspect Element on the page and click on the Source tab and look in the Scripts folder.
For Firefox do an Inspect Element and click on the Debugger tab and look in the Scripts folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 06:53 AM
Thanks ChrisBurks!