- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 03:31 AM - edited 04-26-2024 08:26 AM
hi can anyone help me with scenario for
when i submit a catalog item there are three sc tasks in where i have written a code in 2 and 3 rd sc task to display some value in special instructions field.
What happening is that after i close complete 1 st sc task, the data/value written in 2 and 3 sc task is getting displayed when 1 st sc task is closed complete.
please help me how to fix this and where to fix this in which sc task.
below is the code :
i have written this code in workflow 2nd and 3rd catalog task activity
my requirment is that special instructions value should not display in 1 st sc task when the task is completed and what ever state it should display in 2 and 3 rd sc task only
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2024 12:37 AM
So I added the line in the catalog task and it was updated in the tasks.
u_special_instructions =
and it was updated in the task. It was not updated in the 1st one as per your requirement. If you have created the field check the name of the field that you have created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 06:41 AM
If i update on sc_task it is not showing in all the 3 sc tasks? Can u please help me with the code for sc_task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 06:56 AM
so where is the code which adds the special instruction to 1st sc_task?
you need to search that and update the logic there
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 08:06 AM
this code i have written in 2 and 3 rd catalog task activity and it is showing in 1 st catalog task after 1 st one gets closed complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 09:06 AM
Here you have used sc_request table, but i think the sc_task should be refered as you are updating the task right? and maybe you can it can be simple update like -
task.special_instructions = "1. Complete template to request EP End User Access form Blue Yonder. \n\n2. Submit request (Medium priority) via Blue Yonder portal."
as you can see below variables can be updated by the following statements in sc task activity as given by servicenow :
is this what you are looking for or am i missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 09:09 AM
If i use task.special instructions it is not at all populating and when i confugure the special instructions field its parent is sc_req_item table
can you please show with querying sc_task table as when i replace with sc_task
nothing is generating in other two tasks as well