Current number value is not being passed to Catalog task's Request Item field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:07 AM
Hi All,
I have a small button on the Requested Item, which allows me to create ad-hoc task and relate it to the current RITM:
var catalogtask = new GlideRecord("sc_task");
catalogtask.short_description = "Any other equipment - WEEE ticket";
catalogtask.description = "Please list all additional not registered devices in a flied 'Any Other equipment' ";
catalogtask.assignment_group = "af7227d6db57c410bf0e5858dc961925";
catalogtask.request_item = current.number;
var sysID = catalogtask.insert();
current.sc_task= sysID;
gs.addInfoMessage("WEEE " + catalogtask.number + " for any other equipment has been created");
action.setRedirectURL(catalogtask);
I did not change anything in this script in the last 4 months, but I noticed that
catalogtask.request_item = current.number;
is not passing the correctly number to the Request Item field on the new task:
Can any advise what is going on, I can't figure it out.
I tried add .getDisplayValue(), and I can pass it to any string field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:32 AM
the same thing, it does populate the field, but when I save it, it wipes it out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:35 AM - edited 04-17-2024 07:36 AM
are you working in global or custom scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:37 AM
Global
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:41 AM
when you save which record? already you have used insert(), most importantly where is that script written in business rule?(better be after insert)