Accessing multiple catalog task in ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 11:29 PM
Hi,
In a catalog item that i am testing in ATF the workflow is as such, that it generates multiple catalog tasks(around 15) for a single RITM, i am able to query the sc_task table for all these records, but now i need to access each record and close task for each of them. I tried using the "run server side script",
var grTask = new GlideRecord('sc_task');
grTask.addEncodedQuery('request_item=grTask.number^state=Open');
grTask.query();
while (grTask.next()) {
gs.log('CATNum:'+grTask.number);
grTask.state="Closed Complete";
}
but i do not see the state to be "Closed Complete" for all records. Please help me get a solution.
Regards,
Supritha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2020 02:07 AM
Hi,
So step 18 is for closing the tasks; what is the next step?
Can you try to open the tasks using "Tasks" module from left navigation and check by applying the filter with RITM is from step 9
Or else you can have one more run server side script step after step 18 which would check whether all tasks got closed or not
Any before update BR which blocks closure of SC TASK
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-20-2021 11:30 PM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-04-2021 04:50 AM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-04-2021 12:54 AM
Hi Ankur,
I tried giving field value validation but it failed could you please tell how to give run server script for checking closed or not
Thanks in advance,
Divya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-04-2021 02:44 AM
I have responded to your question for ATF.
Please check that.
How to test catalog in service portal
It would be nice if you close your earlier questions as answered by marking best matching response as correct and helpful.
Members have taken their time, efforts for sharing/discussing the issue and providing workaround/solution.
It would encourage them and also provide credit and recognition to them.
Marking correct answers is helpful to your peers who may have the same question. It also provides credit and recognition to the member(s) who provide answers.
What are the steps to validate notifications in ATF?
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader