SCTASK Fields to Update a Record on a ServiceNow Table

JerickA
Tera Contributor

Hello everyone, I am currently developing a catalog item containing these 5 SCTASKs. The requestor specified what will each SCTASK will contain which are fields that differ from the other per SCTASK. Every SCTASK contains different fields.

They also requested that this fifth or final SCTASK will have to update a target record on a ServiceNow table when the state was changed to Closed Complete. 

I would like to kindly seek everyone's recommendations and expert judgement as to how to execute or configure this, if ever this is possible. 

Thank you in advance.

5 REPLIES 5

AlpUtkuM
Mega Sage

Hi, 

Could you please clarify "5 SCTASKs. The requestor specified what will each SCTASK will contain which are fields that differ from the other per SCTASK. Every SCTASK contains different fields." part? What's the requirement here? 

 

In order to update target record after 5th SCTASK is closed, you could easily do this with flow designer by using "Update Record" action on the flow

Nilesh Pol
Kilo Sage

@JerickA You can handle the different fields per task using Catalog UI Policies or Variable Sets, and manage the sequential tasks and final table update using Flow Designer.


Create Catalog UI Policies for each SCTASK. Set the condition to trigger when Request Item.Catalog Item is your specific item AND Short description is the specific task.


Use ServiceNow's Flow Designer to orchestrate the creation of your 5 tasks and trigger the final update.


Action 1 - 4: Add a Create Catalog Task action for SCTASKs 1 through 4. Ensure you map the RITM and parent Request correctly.


Action 5: Add a Create Catalog Task action for the 5th/final SCTASK.

 

Add a Wait for Condition or a Do the following until loop action. Set this to wait until the 5th SCTASK's State changes to Closed Complete.

Add a Look Up Record or Update Record action. Configure it to target your external/custom ServiceNow table. You can map the fields from the 5th SCTASK's variables directly into the target record.

Ankur Bawiskar
Tera Patron

@JerickA 

You can use either after update BR on sc_task or Flow which runs on Task closure

Ensure you add proper condition based on field values so that this BR/Flow runs only on last catalog task of that RITM

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @JerickA 

 

I will suggest you to use Flow or  Create an After | Update Business Rule on the sc_task table for the final task completion  for your requirement.

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti