Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
29 votes

Should we use process builder at all?

I'll give this one a shot. disclaimer: The only experience I have with process builder was helping my boss out in the Dev Zone at Dreamforce last year. Process Builder is a tool that sits in between ...
Derek F's user avatar
  • 62k
25 votes
Accepted

How do I determine if the case owner is a user or queue in process builder?

Just check the first three digits of the OwnerId field (the key prefix for the Id). You can use a formula criterion here. Is owned by User: BEGINS([Case].OwnerId, "005") Is owned by Queue: BEGINS(...
Adrian Larson's user avatar
  • 150k
23 votes
Accepted

Does Process Builder run with System permissions or User permissions?

According to this answer: Process Builder runs in the system mode so the object and field level permissions both will be ignored for the user who triggers the Process.
Renato Oliveira's user avatar
18 votes

Should we use process builder at all?

Perhaps this is a good time for a wiki. Feel free to throw in your two cents. Cons: Process Builder runs very late in the Order of Execution, meaning even if it's optimized, it is more likely to be ...
15 votes
Accepted

Problem with Process Builder Invocable Method and Webservice Call out

Apex can be annoying like that: limitations in termos of callouts and DML. What we've done to work around that is to make callout in the future method. Your invocable would call the future and pass ...
mkorman's user avatar
  • 4,046
14 votes
Accepted

Code coverage for apex class called by process builder

you can write a test class independent of process builder active/ inactive by calling methods in your main class (dependent on process builder) directly from test class. Another alternative is to use ...
sf_user's user avatar
  • 2,250
13 votes

How to pass more than one parameter for Invocable Methods and collect the return value?

You can do this by using an inner class within the same class you have the InvocableMethod. And receive a List of said class in your Invocable Method. global class ConvertLeadAction { @...
Nahuel Bergamo's user avatar
12 votes

How invocable method and bulk behavior in Process Builder work?

You can also create an @InvocableMethod that takes in a List of a custom class. By doing this, you can pass in parameters in the Process Builder public with sharing class ActionForProcessBuilder { ...
Scott Pelak's user avatar
  • 7,514
12 votes
Accepted

Process Builder - Add Minutes,Hours to Event End Date

Use the Formula like Now() + (60/24/60) Give your required minutes in first 60. If you want for 10 minutes to be added, Give like Now() + (10/24/60) Then you will get the 60 minutes added to the ...
Subhash's user avatar
  • 1,716
12 votes
Accepted

Enable/Disable Process Builder Processes all at once

I wrote a lightning component to allow me to easily enable and disable flows en masse. It lists all the latest Flows, and give you buttons to: Toggle Selected Flows Enable All Flows Disable All ...
Robs's user avatar
  • 9,346
12 votes
Accepted

Trigger flow if a specific field on the updated record changed

Flow Builder's before-save trigger executes before the record is saved to the database. For an existing record, the record that's in the database still has the previous field values, while $Record ...
shannonsans's user avatar
  • 4,753
11 votes
Accepted

How do I check if a record exists in Flow Builder?

https://help.salesforce.com/articleView?id=flow_ref_elements_data_get.htm&type=5 Scroll down on the get record screen and select "Manually assign variables (advanced)". There should be an option ...
Kris Goncalves's user avatar
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
Nitish's user avatar
  • 331
10 votes
Accepted

What is security context of Invocable Methods ran by Process Builder

Invocable Actions are called through the REST API. In fact, you can use them outside of flows, such as just calling them in JavaScript, or in Salesforce1, etc. That said, it makes sense that security ...
sfdcfox's user avatar
  • 493k
9 votes

package.xml format to retreive process builder

I just thought it would be useful to mention how to retrieve a specific one as well, as there is a small caveat here. When just packaging a specific process you must append the API name with the ...
Shawn Kuruganti's user avatar
9 votes

Deployment issues with Process Builder Flows

I wrote an ant target to help with the deployment of flows. Before deploying flows, I fetch the flow definitions, then only deploy flows that are newer than the currently active version. This ...
xn.'s user avatar
  • 2,468
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 ...
sfdcFanBoy's user avatar
  • 4,064
9 votes
Accepted

One Process Builder vs Multiple per single Object

If you have a great many processes you want to automate, then consolidating them into one flow via Process Builder can be a great choice from an organization perspective. Doing so will also give you ...
Adrian Larson's user avatar
  • 150k
9 votes

How does Lightning Component Framework request boxcar'ing affect flows and transactions?

From what I can tell, it appears that the boxcar effect in Lightning has multiple transactions, but a single governor limit shared across all transactions. It's not in the documentation, which ...
sfdcfox's user avatar
  • 493k
9 votes

Invocable method Apex class is not visible in Process builder

This problem often resolves itself by going to Setup | Develop | Apex Classes | select the test class and then run tests. SFDC needs to be sure class has been tested to appear in dropdown. Solution ...
cropredy's user avatar
  • 71.7k
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 ...
Adrian Larson's user avatar
  • 150k
9 votes
Accepted

PB + Queueable System.FinalException: Record is read-only

I suspect that you've unwittingly copied the "isReadOnly" flag on the sObject records. This flag, which can't be accessed or modified directly, is responsible for causing the FinalException that you'...
sfdcfox's user avatar
  • 493k
9 votes
Accepted

How do processes consume SOQL queries?

It's one DML and SOQL per 200 records or a single DML "chunk." To illustrate this, consider the following code: contact[] c = [select id from contact limit 5]; id accountid = [select id from account ...
sfdcfox's user avatar
  • 493k
9 votes
Accepted

Getting System.FinalException: Record is read-only when PB calls an apex class

let me guess, that records, that are sent to Apex are sent from Process as "Select the Case record that started your process". According to the Order of Execution process is launched after after ...
Oleksandr Berehovskyi's user avatar
9 votes
Accepted

Flow Error - Apex CPU Time Limit Exceeded

The CPU time limit is a cumulative limit across the whole transaction. Essentially, what is happening is that your Flow, plus your Process invocations, plus the NPSP triggers that are run consequent ...
David Reed's user avatar
  • 93.1k
9 votes
Accepted

How to deactivate a existing active process builder using metadata API?

I was able to deactivate process builder as follows: Retrieved FlowDefinition file for the process builder that I am trying to deactivate using the command sfdx force:source:retrieve --metadata=...
javanoob's user avatar
  • 8,887
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; ...
kso's user avatar
  • 323
8 votes
Accepted

How many process builder can be used in sandbox?

You can refer the limit documentation here Total active rules and active processes per object is 50 Rules include workflow rules, escalation rules, assignment rules, and auto-assignment rules.
Mohith Shrivastava's user avatar
8 votes
Accepted

Process Builder is not validating through change set

Process builder deploys in an inactive state. If test methods are written around its results snd this blocks your deployment you have the following options: Manually create the PB in production and ...
Eric's user avatar
  • 54.2k
8 votes
Accepted

We don't support this API version. Use API version 32.0 or later to retrieve this process

As it turns out, I needed to update my package.xml version to 38.0. After doing so, the process retrieved fine. I cannot say for sure but I believe the issue was due to the offending process being ...
Swisher Sweet's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible