[SalesForce] Account Team Flow/Process

I have a Process that triggers a Flow. The flow takes a user from a lookup field on Account and adds them to the Account Team – work fine

My issue now is that I want to delete the user from the Account Team if the value on the lookup field is deleted.

I'll also want to delete the user if the value in the lookup field changes but will worry about that later

I've made a Flow to delete the User – which is fine – the problem seems to be my Process – I keep getting the error "The flow failed to access the value for [example] because it hasn't been set or assigned."

To trigger the Flow from the Process I've set the condition to be
ISBLANK(User_Lookup) && ISCHANGED(User_Lookup)
from which is pass the variables to my Flow
AccountID
PRIORVALUE(User_lookup.id)

I've tried a few variations of this – using ISNULl, using the Conditions are met way but always get the same error

Any ideas? How can i trigger this flow from a ISBLANK ?

Note: In the Process, the first condition is
NOT(ISBLANK(User_Lookup)) && ISCHANGED(User_Lookup) – this triggers the adding of the user to the Account Teams – its working fine

Best Answer

Got it working (with some help from David above) - because i was going crazy i added a wf to capture the previous user id - i might look to get rid of this

Firstly I was kinda being stupid in the PB - my initial criteria check on the PB was looking at the RelatedUser.id field - so it was a cross object relationship. specifically NOT(ISBLANK(RelatedUser.id))

This was fine as long as you where adding a user to the team, once you went to delete one though it threw up the error "The flow failed to access the value for [example] because it hasn't been set or assigned."

I was wondering why I could not just see the field standalone like you normally do (see below)

enter image description here

Anyway turns out the field was renamed ages ago - just had to search a bit harder to find and PB does not make that easy

Finally my delete Flow was a bit wrong - you first have to lookup the Account Team Table to get the ID (its no good using the UserID) - then just delete the relevant Account Team Member Record - no need to delete the share also