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 08:07 AM
it is not a business rule, it is a UI Action, which worked spotlessly for the last 5 months
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:38 AM
Why do you need to save it. It will automatically update form as this is business rule. Not getting it, can you share snapshot of your business rule script and when to run section
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:45 AM
This is UI action,
This is what happens.
https://drive.google.com/file/d/18Q-tmPDYZmCpjlU4_s8goveM7Azyqhde/view?usp=sharing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:48 AM
the reason is, record is not saved before using ui action, after clicking on that ui action your record is discarded!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 07:58 AM
can you check "save" ui action button on sc_task table. If possible sent snapshopt I can help you out