get the values in List Collector populated in Work Notes at Fulfillment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 02:06 AM
Hi,
I have a requirement wherein I need to populate the values I selected for list collector, once saved populated in Work Notes at Task. I tried, but I don't have correct logic. Kindly help.
ClientScript
function onSubmit() {
//Type appropriate comment here, and begin script below
var inc = g_form.getValue("incidents_submitted_by_itam");
var ga = new GlideAjax("listCollectorIncidentClass");
ga.addParam("sysparm_name", "listCollectorIncidentFunction");
ga.addParam("sysparm_id", inc);
ga.getXML(callBackFuntion);
function callBackFuntion(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
g_form.setValue("work_notes", answer);
}
}
ScriptInclude
var listCollectorIncidentClass = Class.create();
listCollectorIncidentClass.prototype = Object.extendsObject(AbstractAjaxProcessor, {
listCollectorIncidentFunction: function() {
var userArr = this.getParameter('sysparm_id').toString().split(',');
var incArr = [];
var grUser = new GlideRecord('sc_task');
for (var i = 0; i < userArr.length; i++) {
incArr.getINC = get(userArr[i].toString());
}
grUser.work_notes = grUser.getDisplayValue(incArr.getINC);
},
type: 'listCollectorIncidentClass'
});
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 02:59 AM
Hello @Community Alums,
Do you want to update the list collector values in sc_task work notes?
Thanks,
Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 03:05 AM - edited 09-28-2023 04:42 AM
Hi @anshul_goyal,
The list collector should appear in Task level itself, and on save, whatever the incidents are selected in the slush bucket, they should be populated in Work Notes. Can you please help
Regards
Suman P.