- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2017 04:36 AM
Hi all,
I have a problem with an HRC. In the following my example:
An employee creates a request and the responsible HR worker delegates it to IT department, because he can not resolve the issue.
The HR worker therefore wants to open a ticket at the IT servicedesk.
For clarification:
The HR instance and the IT instance should be strictly seperated.
Here are my Questions:
1. How can the HR worker pass the HRC to IT department ?(create an INC)
2. Can the newly created ticket be configured, so only information, which is not confidential, is visible?
Hopefully someone can Help.
Solved! Go to Solution.
- Labels:
-
HR Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2017 05:49 AM
It would look something more like this - ensure you have the Client checkbox checked and the onclick field says "runClientCode()" (without quotes)
//Client-side 'onclick' function
function runClientCode(){
if(confirm(confirm("Do you want to create an incident") == false){
return false; //Abort submission
}
//Call the UI Action and skip the 'onclick' function
gsftSubmit(null, g_form.getFormElement(), '<button_action_name>'); //MUST call the 'Action name' set in this UI Action
}
//Code that runs without 'onclick'
//Ensure call to server-side function with no browser errors
if(typeof window == 'undefined')
runBusRuleCode();
//Server-side function
function runBusRuleCode(){
var inc = new GlideRecord('incident');
inc.initialize();
inc.short_description = 'Test description';
inc.caller_id.first_name = 'John';
inc.caller_id.last_name = 'Smith';
inc.insert();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:30 AM
Found the issue nielsm
it was within the code, line 24. I had created the related field on the Incident Form, however never captured it within the actual code. Therefore the Action had no idea what to do it it and therefore just skipped right over. It now works as needed!!
Thanks for the additional help with this!
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 09:06 AM
Is it possible to select location and pass the selected location to Incident/Request. We have added the below code to 'hr_to_incident_request' UI page and the location is displayed but we are unable to map it respective incident/request upon selection.
<div id="selectActionBoxContainer">
<label for="my_choice">Choose a Destrict: </label>
<select name="my_destrict" id="my_destrict" >
<g2:evaluate>
var rec = new GlideRecord('cmn_location');
rec.addEncodedQuery('u_location_type=Facility/Site'); //change city to your field name
rec.query();
var recList = [];
while(rec.next()) {
des = rec.city.getDisplayValue(); //change city to your field name
recList.push(des);
}
var arrayUtil = new ArrayUtil();
recList = arrayUtil.unique(recList);
recList.sort();
</g2:evaluate>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:26 PM
Hi There,
The UI Action is currently also available for Lifecycle cases. Is it possible to hide the UI action from Lifecycle cases.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2021 07:26 PM
You can modify the Condition field on the UI Action to exclude the Lifecycle Event case table using a condition like the one below. This would be in addition to any other conditions already being used.
current.sys_class_name!="sn_hr_le_case"