
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 04:57 AM
I am taking Employee input from service portal using HR Task type Collect Employee Input and Employee form. There is only 1 record matching the condition. Question type is string. Target field is also string.
Taking user input from esc portalNot mapping the value to the backend HR Profile field.
Has anybody encountered this configuration issue?
Solved! Go to Solution.
- Labels:
-
HR Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 05:26 AM
This is specific to Paris, which you have listed as the version you are working on. In short, within the widget HRJ Task Collect Information, it is possible that the method - $scope.surveyClick() is called before the survey instance state is complete , due to which the mapping of fields are not processed
1) In widget Widget HRJ Task Collect Information :
a) Client Controller : Remove the method $scope.surveyClick();
b) HTML : Remove the call to surveyClick():
c) Server script : Remove the following lines :
if (input && input.action === 'setTaskFinished') {
new
EmployeeDataCollection().saveUpdatedData(data.sys_id);
return;
}
2) The following BR "Reset invoking task status " is modified. The method saveUpdatedData is been called from BR only after survey instance is completed .
var states = {
'ready': 10,
'wip': 18,
'complete': 3,
'canceled': 7
};
var gr = new GlideRecord('sn_hr_core_task');
if (gr.get('survey_instance', current.sys_id)) {
if (states.hasOwnProperty(current.state))
gr.setValue('state', states[current.state]);
else
gr.setValue('state', 10);
gr.update();
if (gr.state == '3') {
if (gr.getValue('hr_task_type') == 'collect_Information')
new
sn_hr_sp.EmployeeDataCollection().saveUpdatedData(gr.sys_id);
gs.addInfoMessage(gs.getMessage('The to-do "{0}" has been completed ', gr.getValue('short_description')));
}
}
3) Business Rule :"Reset invoking task status" "When to run" should be changed from before to after.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 05:26 AM
This is specific to Paris, which you have listed as the version you are working on. In short, within the widget HRJ Task Collect Information, it is possible that the method - $scope.surveyClick() is called before the survey instance state is complete , due to which the mapping of fields are not processed
1) In widget Widget HRJ Task Collect Information :
a) Client Controller : Remove the method $scope.surveyClick();
b) HTML : Remove the call to surveyClick():
c) Server script : Remove the following lines :
if (input && input.action === 'setTaskFinished') {
new
EmployeeDataCollection().saveUpdatedData(data.sys_id);
return;
}
2) The following BR "Reset invoking task status " is modified. The method saveUpdatedData is been called from BR only after survey instance is completed .
var states = {
'ready': 10,
'wip': 18,
'complete': 3,
'canceled': 7
};
var gr = new GlideRecord('sn_hr_core_task');
if (gr.get('survey_instance', current.sys_id)) {
if (states.hasOwnProperty(current.state))
gr.setValue('state', states[current.state]);
else
gr.setValue('state', 10);
gr.update();
if (gr.state == '3') {
if (gr.getValue('hr_task_type') == 'collect_Information')
new
sn_hr_sp.EmployeeDataCollection().saveUpdatedData(gr.sys_id);
gs.addInfoMessage(gs.getMessage('The to-do "{0}" has been completed ', gr.getValue('short_description')));
}
}
3) Business Rule :"Reset invoking task status" "When to run" should be changed from before to after.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2021 11:45 PM