I have a custom object (X) with a text field (T) which stores Salesforce opportunities ID. And process builder on this custom object (X) uses custom text field (X) values. But sometimes text field (T) contains id of deleted opportunity and such record on modification gives flow error.

So in process builders entry criteria i wanted to check if id in custom text field is deleted or not. Is it possible to achieve this functionality? I am open for suggestion. as i don't know any other way to know if id is deleted or not without SOQL.

  • 1
    Is the field containing this data Lookup or Text?
    – Adrian Larson
    Mar 10, 2017 at 17:06
  • It is a Tex field...lookup can be made empty on deletion...but i wanted to check in process builder formula if id in text field is deleted or not. Mar 10, 2017 at 17:10
  • Could you convert your code to use a new lookup field instead of the text field? It might be worth the hassle in this case. (Related) Mar 10, 2017 at 17:44
  • 1
    that will solve this problem for sure....but i can't actually. There exist a lookup to opportunity already...as a matter of fact lookup to opportunity is getting updated with values from this text field (X)....thats why i wanted to check this id in text field (x) before assigning it to lookup. Mar 10, 2017 at 18:13
  • @battery.cord, you can post your comment as an answer Mar 10, 2017 at 18:43

1 Answer 1



In process builder at a time we can access one object itself. So we cannot use opportunity object to check whether the Id is deleted or not.


  1. Add a field to your object which specifies the status of the opportunity like active or not check box. And you can use that field in process builder to check condition whether opportunity is deleted or not.

  2. Create a before delete trigger for opportunity object to update the active field in check box for your object.

This will help achieve your requirement without any soql.

You must log in to answer this question.

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