How to Get SC Task Closed Date in Flow Designer Script Step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 08:14 AM
Hi Community,
I'm working with Flow Designer and I have a flow triggered by an SC Task. I want to retrieve the closed_at date of that SC Task and use it in a Flow variable called revokeAccess.
// i am using this in my background script to get the closed date help me to get in my flow script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 08:26 AM
Hi @LokeshwarRV
you should do it via GlideRecord instead of GlideDateTime
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 08:33 AM
if the flow trigger is on sc_task you can directly access the closed_at field.
Why to use Flow variable?
IF you still require then
you can use "Set Flow Variables" flow logic and use script to set the value
something like this in the f(x) inline script
return fd_data.trigger.current.closed_at.toString();
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
08-06-2025 12:23 AM
Hope you are doing good.
Did my reply answer your question?
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