11
votes
Accepted
Salesforce Flow Limitations - Loop vs Batch Records
What is the difference between a transaction and interview?
A transaction is one complete execution unit as far as the server is concerned. I've always explained it as this: one debug log equals one ...
10
votes
Which will get executed first workflow or Process Builder
Order of execution of Triggers -> Workflows - > Process Builder.
Please see link and point number 12 and 13:
Triggers and Order of Execution
9
votes
Accepted
2 workflows vs Process builder. Which one is better?
You should go with Process Builder. The beauty of process builder is one process can handle multiple criteria updates and all of them will be in a single process like the one you have now.
Process ...
9
votes
Workflow versus Process Builder. How to choose which to use?
Last I checked, Workflow performs significantly better on CPU Time. That on its own is a compelling argument to reverse your assumption. Instead ask yourself why you would use Process Builder when you ...
9
votes
Accepted
How to capture Workflow email alerts under activity history with date and time
When using Workflow rules to trigger email alerts, activities are not automatically logged when the email is sent.
So to do this, have the Workflow trigger a task (in addition to the email alert ...
8
votes
Accepted
How can we inactivate user those are not logged in last 120 days
List<User> usersToUpdate = new List<User>();
for(User u : [Select id, IsActive from User where isActive=true and lastLoginDate <= :DATE.TODAY()-120]){
u.IsActive = false;
...
8
votes
CPU issues caused by process builder and workflows has really gotten bad in last 3 releases
Edit: I was reminded of this question recently, and decided to make an edit. the original is left below for posterity.
After the original answer, I had the Flow Product Manager reach out to me. We ...
8
votes
With so many workflow/flow/process builders, how can we keep things in order
First of all, this is an excellent question and I am writing best as per my opinion which can vary with others.
Considerations
When to do what and what can be supported over other.
Process ...
8
votes
Accepted
How to package deactivation of a Workflow?
In my experience, workflow rules do not get de-activated on upgrade - I think it is one of those things where they don't want to override the customers decision to turn off a workflow rule, in the ...
7
votes
Can triggers tell if a Workflow invoked them?
Triggers (which represent the domain layer in a Separation of Concerns architecture) should not have to know how they were invoked as they could be invoked via
Web or REST service DML
VF controller
...
7
votes
Accepted
Use Less than and greater than workflow criteria with text field
Use the formula "VALUE".
VALUE(text)
Converts a text string that represents a number to a number
Then you can use greater/less than operators.
Example: VALUE(text_1__c) < 5
EDIT 1: If ...
7
votes
Accepted
What are the drawbacks of using outbound messaging?
For me it has been frustrating to have them in place because there is no response logging mechanism, as far as I'm aware. This lack exacerbates the difficulty of having asymmetric validations in place....
7
votes
Accepted
Daily email limit - via workflow, Mass Email, Single Email
It is the:
Its the number of user licenses * 1000 not active users.
7
votes
Accepted
Find the word count of a Rich Text Area
You can't reliably use LTA, RTA, or ETA fields (Long, Rich, Encrypted) in formulas, but you can in Apex Code. My solution would be simply:
trigger CheckWorkCount on SObject (before insert, before ...
7
votes
Deactivate User whose last login is more than 30 days
You can't use a workflow rule for this, because logging in doesn't trigger workflow rules. Instead, you'll want to schedule a regular check to deactivate users:
public class DeactivateInactiveUsers ...
7
votes
Accepted
Outbound Message Limits?
As per Documentation there is no limit for Outbound message per day. From what I am aware there isn't a limit on the number of outbound messages sent. API limit is only for incoming API calls. ...
7
votes
Workflow versus Process Builder. How to choose which to use?
I'll add:
When working with e-mail alerts, the setup UI knows which workflow rules use any given alert and will show you this in a very simple way. The setup UI has no idea which Process Builders use ...
7
votes
Accepted
How can I know if it's the last execution of an After Trigger?
Conceivably what you could do is set up a Queueable class. On the first pass through the trigger, instantiate and enqueue it, and then save that in a static variable so you know it's already been ...
7
votes
Accepted
how to dynamically require field in flow builder using formula
Two main approaches come to mind:
1) Set up conditional visibility
Including two instances of the second input component in the screen
Making one required, and the other optional
Setting up ...
7
votes
Accepted
How do you handle deployment of changes unsupported in metadata api?
We (Salesforce.org Release Engineering, where I work) use browser automation built on Robot Framework and Selenium to automate setup actions that are not Metadata API accessible. Robot covers both ...
6
votes
Formulas in workflows & validation - lazy or eager evaluated?
I took a crack at figuring this one out.
To help cut down on noise, I tried to use the most onerous (and least useful) validation rule I could come up with. My hope with this was that I'd be able to ...
6
votes
More concise syntax
Using your exact list options, you could do this:
VALUE(LEFT(TEXT(Close_to_my_ideal__c), 1))+
VALUE(LEFT(TEXT(Important_things_I_want__c), 1))+
VALUE(LEFT(TEXT(Satisfied_with_my_life__c), 1))
...
6
votes
How many recipients can i add in email template alert?
There are limits, but the limit you are likely going to hit is the daily limit for workflow emails.
You can though add an alias in the additional emails section. Even if that alias (EntireCompany@...
6
votes
Accepted
Prevent duplicate account creation with custom error message
No, you can't custom the error message for field uniqueness constraints.
However, you can prevent accounts with duplicate names and provide custom error messages using duplicate rules. Watch the ...
6
votes
Accepted
How does Read-Only field level security affects Apex and Workflows
Apex and Workflows function independently of field level security; see the documentation for considerations for workflows and Field level security.
So Apex code and workflows will be able to read and ...
6
votes
Accepted
Workflow Rule (Ischanged) - Field is not updated when the record is created
Well, aside from the AND being extraneous, you need to add an ISNEW check to your OR clause if you want it to fire on create. The ISCHANGED formula returns false on create.
OR(ISNEW(), ISCHANGED(...
6
votes
Accepted
Sum of fields in a field update when some of the fields are null
Your friend is the BLANKVALUE function that if the first argument is null, will use the second argument as the value of the expression
BLANKVALUE(Field__c,0) + BLANKVALUE(Field1__c,0) + ...
6
votes
Birthday Alert Every Year
PB is not the way to do this for exactly the reasons you're stating. Unless there's DML performed of some kind on each contact, it won't fire for the contact. I don't know how many contacts you have ...
6
votes
Accepted
How to get parent data in a before insert context?
You can just query the PricebookEntry records instead:
Set<Id> entryIds = new Set<Id>();
for (QuoteLineItem item : trigger.new) entryIds.add(item.PricebookEntryId);
Map<Id, ...
6
votes
Accepted
Workflow rule order of execution
The order of execution is indeterminate. Technically speaking, the current implementation seems to be that the workflow rule created last will take precedence, but you must not depend on that behavior....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
workflow × 1438process-builder × 219
apex × 204
trigger × 204
visual-workflow × 138
time-dependent-workflow × 122
formula × 119
email-alert × 108
field-update × 101
email × 83
formula-field × 54
workflowrule × 48
case × 36
email-template × 35
opportunity × 35
visualforce × 34
tasks × 34
workflowoutboundmessage × 30
community × 28
approval-process × 25
validation × 23
automation × 23
custom-object × 22
custom-field × 22
administration × 21