While I'm using process builder on case object. I'm not able to include suppliedmail (web email) in rule criteria. can anyone help me in this issue? is this salesforce issue? P.S: I have System admin profile
3 Answers
It looks like the Web Email (SuppliedEmail) field is labeled Email Address in the Process Builder criteria builder -- if you click into the field you'll see that the API name is SuppliedEmail. Similarly, Web Name (SuppliedName) is labeled Name, Web Phone (SuppliedPhone) is Phone, and Web Company (SuppliedCompany) is Company.
(I filed a bug about the label discrepancies.)
Try that and see if it works.
-
I have one more question, can we use formula fields in rule criteria node? I had tried adding formula field in rule criteria but not able to see any corresponding actions being performed on record. Feb 12, 2015 at 11:54
-
No. Rule criteria are only checked when a database event occurs, like creating or saving a record. Formula field values are never stored in the database -- they are updated at runtime whenever a user views the record (e.g. in a page layout or report) or when referenced by another formula. So formula fields don't cause database events. Mar 4, 2015 at 20:36
I found this solution in case anyone is wondering about this issue. The field SuppliedEmail is uneditable after the case has been created. You can work around this using a before insert trigger/helper class to populate the field if it's empty.
Trigger:
trigger caseAutomationTrig on Case (before insert, before update, after insert, after update) {
if(trigger.isBefore) {
if (trigger.isInsert) {
caseAutomation.beforeInsert((List<Case>)trigger.new);
}
Helper Class:
public static void beforeInsert(List<Case> buildMe){
for (case c : buildMe){
if (c.SuppliedEmail == Null){
c.SuppliedEmail = 'replace.me@example.com';
}
}
}
-
not clear why you need variable
cases
in thebeforeInsert
handler as changes to Trigger.new are implicitly saved tot he database when the trigger completes– cropredyJan 20, 2016 at 19:26 -
-
ah -- you might want to read Appleman's Advanced Apex 3rd Edition or Fawcett's Enterprise Force.com to get into good habits– cropredyJan 20, 2016 at 20:21
The standard field 'Web Email'(api 'SuppliedEmail') on the Case object falls under the 'Email Address' field in the Process Builder so Type 'Email Address' and select it in criteria https://help.salesforce.com/articleView?id=000220120&type=1