Need process Builder help! - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Rasha LuiceRasha Luice 

Need process Builder help!

I have a field called Billing Event that gets populated with record id when a new record gets created.
So the initial value is Null before creating the new record. And when the new record gets created, the Billing Event field gets populated with the record id. If the record gets deleted,  the Billing Event field becomes Null. 

I need to create a process builder that will ONLY fire when the Billing Event field had a value and now is back NULL. The PB I created doesn't seem to work. 
My PB criteria is : 
Billing Event IS Changed = True
Billing Event Is Null = true

Then the Immediate Actions are
Email alert sent
Adam JohnsonAdam Johnson
Try changing it to a formula that looks something like (make sure to use the field picker to put your field API name in the right process builder format):

sakshi nagpalsakshi nagpal
Hi Rasha,

 It seems that you want to fire process builder when record is deleted?
based on your criteria-:
Billing Event field had a value and now is back NULL

However when record is deleted, you wont be ab;e to access the field value of Billing Event
Let me know if my understanding is correct.
Also there is alternative method to trigger process builder for deleted record.However the record should have master detail relationsip and Roll up summary field should be present on parent object.
Rasha LuiceRasha Luice
@Adam, Thanks for your re[ly. I tried your formula and the PB still didn't fire. 
@Sakshi, you're right. I have 2 objects here. Billing Event and Milestones. There is a :Lookup relationship from Milestone to Billing Event. The Billing Event field I'm refering to is rolled up to the Milestone object. So the OB I created is firing on the Milestone object level. 
sakshi nagpalsakshi nagpal
Hi Rasha,

 Is Billing event a formula field?
if we use formula field in process builder criteria, there are certain limitations, refer this post

 try the workaround suggested in link

Let me know if it is helpful
Adam JohnsonAdam Johnson
Hi Rasha - to confirm, your Billing Event field is a Lookup Field on the Milestone, and your Process Builder is on the Milestone object?  Those were assumptions i used when writing my formula.  If that's not the case, let me know, and we can work this out.  Thanks
Rasha LuiceRasha Luice
@Adam, no this is a formula field that returns a link to the Billing event record. and yes, the PB is on milestone object
Adam JohnsonAdam Johnson
How does the formula field get populated?
sakshi nagpalsakshi nagpal

 It looks like When new record gets created formula field should be populated with a link to the Billing event record. When that record is deleted the link on Formula field will disappear. Based on this change process builder should trigger.
The formula that u sent earlier should work in that case.
Rasha LuiceRasha Luice
The formula field is part of a managed package. It adds a hyperlink to the billing event that was generated and included the milestone. So when on the milestone page, if the Billing field has a value (Hyperlink), that means this milestone is included in the billing event. So the user can click on the Billing event field and will be directed to the Billing event page. 
Now, when a user decides that this billing event doesn't include the correct items and should be cleared(deleted), then they can clear it. At that point of time, the Billing event field (on Milestone object) will be cleared from its previous value as well. That's when I want the Process Builder to fire and send an email to a Dist List to let them know tha tthe billing eventrelated to X milestone has been cleared. And to go and review the milestone items to re-generated the billing event again. 

I used your previous formula and tested the process builder again, but it didn't fire, unfortunately. 
Adam JohnsonAdam Johnson
What are the criteria on the Billing Event that cause the formula field to get cleared?  We may need to fire the email alert from the BIlling Event rather than the milestone as a Formula field won't trigger an alert. However if it's a managed package, and there is no direct relationship, I would assume that it would be a non-formula field and an actual update happening.  
Rasha LuiceRasha Luice
There is abutton on the billing event that when you click on and confirm, it delets the record. 
I tired to create a formula field that returns a checkbox. I used the formula your provided above to check the new field if the Billing event becoms null after it had a value. And tried to use that checkbox to fire the email alert, but that didn't work either. 
The checkbox is not getting checked after the billing event field is null again. 
sakshi nagpalsakshi nagpal
Hi Rasha,

If you have a master detail relation between Milestone to Billing Event and you use Roll up summary field in process builder criteria, then this would work,
Process builder does not fire on change of formula field.However process builder gets fired on change of Roll up summary field

 Refer this link -:

I am not sure if you change the relationship,however that is the only option

Please refer the link-:

Please let me know if it is helpful!
Rasha LuiceRasha Luice
Thanks Sakshi, That's what I have attempted lastely. I have created the rollup summary field and now working on the formula. The logic I'm looking for is to basically look at therollup summary field. Check if the value of the field changed from 1 to 0, fire the email alert. I haven't built the correct formula yet, but still working on it. 
sakshi nagpalsakshi nagpal
Hey Rasha,

 If you are able to do it,please close the thread, and mark is as best answer if it helpful!