Create a UI action button to create a new task and copies everything from RITM or another task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2021 01:13 PM
I have need of a new UI action button located on the request item form (or task form, I don't really care which it's on) that creates a new task and copies all variable data from the RITM or another TASK and assigns it to a different group. I've got the startings of a UI Action and put it on the request item form but really am not sure how I would proceed with getting the variable fields on there. Any insights would appreciated.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2022 07:27 AM - edited 10-06-2022 07:27 AM
@JustinB1 I just found this article myself, and had the same issue as you. One quick modification and it's working as expected.
Change the line:
// gr.addQuery('request_item.numberSTARTSWITH' + req.getValue('number')); Original Code
To this:
gr.addQuery('request_item.numberSTARTSWITH' + current.getValue('number'));
Once that was changed, everything copied correctly.