How to pause a flow until an attachment is added to the RITM record?

Ashish Ranjan G
Tera Expert

Hi,

I need to pause flow until an attachment is added to the RITM record. I have tried "lookup attachment", "lookup records", "wait for condition" actions etc. however none seem to be helpful here. Has anyone worked on similar requirements using flows before? If so, please suggest appropriate ways to fulfil this requirement. Thanks

1 ACCEPTED SOLUTION

Thanks for the suggestion Sai. Actually, that did not work. However, I figured out a solution which involved creating a script action to check if an attachment is added to the RITM record and then used it within do-until logic along with setting up some flow variables and wait-for duration action to achieve the requirements. Indeed, there is no direct workaround for this but glad I figured out a way 😄

View solution in original post

2 REPLIES 2

Sai Kumar B
Mega Sage
Mega Sage

@Ashish Ranjan Gupta 

If possible try using the script in wait for condition action, The below is the sample script you can modify it accordingly.

var attachmentAvailable = new GlideRecord('sys_attachment');
attachmentAvailable.addQuey('table_name', 'sc_req_item');
attachmentAvailable.addQuery('table_sys_id', 'give the current record sys_id');
attachmentAvailable.query();
if(attachmentAvailable.next()) {
return true;
}
return false;

Thanks for the suggestion Sai. Actually, that did not work. However, I figured out a solution which involved creating a script action to check if an attachment is added to the RITM record and then used it within do-until logic along with setting up some flow variables and wait-for duration action to achieve the requirements. Indeed, there is no direct workaround for this but glad I figured out a way 😄