Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Create a Task when alm_asset.warranty_expiration is exceeded

jyan3
Kilo Guru

Hi,

I was wondering what the best way would be to generate a catalog task when the alm_asset.warranty_expiration date is exceeded.

I thought about creating a scheduled job to ping the table and loop through all of the records and kick off a workflow when it finds a hit, but that seems kinda inefficient.

Alternatively, I was thinking I could create a workflow based on the table column = today, but I can't generate a catalog task in the workflow editor when the source table is alm_asset. I guess I could script an insert into the task table.

I was just wondering if there was a better way to do this.

Thanks

1 ACCEPTED SOLUTION

Biddaum
Tera Guru

You could add a new flow where the trigger is daily at a specified time, then checks on the alm_asset table looking for records that warranty expiry is at or before today, then if it finds records then log a record for each one. You can create an sc_task directly if you use 'create record' and specify the sc_task table and add all fields you want to populate, or you can create a catalog item specifically for these and in your flow 'submit catalog item' and fill in the fields required, then create a sc_task from there in your next step.

 

Here is an example flow:

Bidduam_0-1749515002135.png

 

View solution in original post

7 REPLIES 7

nevermind i got it thanks

helen628you
Kilo Contributor

Hello,

 

Use a Scheduled Script to check alm_asset for expired warranty_expiration dates and create Catalog Tasks via GlideRecord. Mark processed assets with a flag like u_task_created to avoid duplicates. It's efficient and avoids workflow limitations on alm_asset.

 

Best Regard,

Helen

 

prepaid gift balance com

Ankur Bawiskar
Tera Patron

@jyan3 

catalog task ideally has an associated RITM and REQ.

are you planning to create a standalone SC Task?

The only way is to have a daily scheduled flow and it loops and sees if the Asset -> Warranty Expiration is crossed or not

If yes then create a catalog task

If my response helped please mark it correct and close the thread so that it benefits future readers.

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