I've created a visual work flow that has a fast lookup. The lookup basically finds the Account_Share records that have a parent account id equal to a variable.

I'd like to take this a step further and have it only return the Account Share records that have a parent account equal to the variable mentioned above AND are related to users that have a UserType of PowerPartner (this is stored in the user table).

How would I go about doing this? I would think that you could somehow reference fields in the user table since the Account Share table and the User table are related, but I can't seem to figure out how to enter cross-object criteria like this into the fast lookup window.

I'm thinking that I could do a fast lookup on the User table to return a sObject Collection of PowerPartner User Ids, and the iterate on that to get those users that have an Account Share record. I'm just not sure how to do that. Essentially, it seems like I need to use the User table "query" as a "sub-query". Can this be done in flows?

1 Answer 1


To narrow down the AccountShare records to only include AccountShare records with Users with the UserType of "PowerPartner", you want to loop through the AccountShare collection you created via Fast Lookup.

  1. In the loop you want to do a Lookup of the User to check the type,
  2. then use a decision element to determine whether or not the record should be included in a sObjectcollection of AccountShares for PowerPartners,
  3. Those that are should be assigned to a PowerPartner collection,then back to the loop,
  4. those that aren't should go directly to the loop.

The image below helps explain the relationship.

AccountShare Flow Screenshot

  • I just stumbled across this post and I'm curious if having these Lookups in a Loop causes bulkification issues the same way that it would in Apex code?
    – dBeltowski
    Jan 25, 2016 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .