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

Bidduam
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

Bidduam
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

 

Will this create a task for each record?

@jyan3 

yes

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

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

I ended up using a foreach loop to do it

how do i refer back to the asset to write a short description in this context? 

would it be something like current.<column_name>?