5

I need to cancel some of the actions scheduled by different process builders (executed on opportunity) but it is not easy to identify the related paused interview flow records....I dont know how can I do it.

I was thinking to use a SOQL in order to check if there is any way...it seems there are some objects like FlowInterview, FlowInterviewShare and FlowRecordRelation. The first two contains around 1.9K records but the last one returns 0 records, and it seems this one is the object that contains the relation between the paused flow interview and the record (opportunity)

What can I do?

Thanks!

5
  • 1
    You have to set the FlowRecordRelation by setting the {!$Flow.CurrentRecord} system variable to a valid record ID in an Assignment element, I believe. That's why you see none. Are you only looking to cancel certain actions for certain records or by process builder? FlowInterview contains the InterviewLabel which has the name of the process builder. Apr 3, 2020 at 20:37
  • but i need to delete only some of the FlowInterview related to the PB, not all of them...:(. Oh, or the future I can set that system variable, but for the current problem is not valid... Apr 3, 2020 at 20:41
  • 1
    Unfortunately, you might not have any options in that case. All examples of this involve utilizing FlowRecordRelation which you have none of. You'll have to get creative and maybe can use CreatedById + PB Name on FlowInterview if you know who updated the record(s) you want to cancel. It's a lot, but it's something to help narrow it down. Apr 3, 2020 at 20:47
  • Thanks! I am going to try to rerun those PB only for the involved opps changing some fields in order to see if automatically Salesforce removes the actions if the conditions are not valid anymore.... Apr 3, 2020 at 21:29
  • doc ref on setting FlowRecordRelation
    – cropredy
    May 14, 2021 at 0:15

0

You must log in to answer this question.

Browse other questions tagged .