Frequently Asked Questions

Doug Ayers edited this page Feb 4, 2019 · 15 revisions

Home > Frequently Asked Questions


What magic enables such awesomeness?!

All this is made possible by the Salesforce Actions API.

Why do I see a warning about installing a "Non-Salesforce Application"?

You’re installing a Non-Salesforce Application that is not authorized for distribution as part of Salesforce’s AppExchange Partner Program.

Non-Salesforce Applications that are authorized for distribution as part of Salesforce’s AppExchange Partner Program meet certain criteria to participate in Salesforce’s AppExchange Partner Program and undergo an initial security review. Acquisition of Non-Salesforce Applications and any exchange of data between you and the provider of that Non-Salesforce Application are solely between you and the provider. Salesforce does not warrant or support such applications. For more information, see “Non-Salesforce.com Providers” in the Master Subscription Agreement.

Salesforce displays this warning any time you try to install a managed package that is not registered through the AppExchange Partner Program. I have not registered with the AppExchange, though completing the Security Review is on my todo list.

Mass Action Scheduler is a free and open source application. You may download, review, and deploy the code from GitHub if you prefer. I provide a managed package option as an easier way to install the app. If you trust me, then select the option "I acknowledge that I’m installing a Non-Salesforce Application that is not authorized for distribution as part of Salesforce’s AppExchange Partner Program." and click Install/Upgrade.

screen shot

Why is a Named Credential required?

Starting in version 2.0, Named Credentials are optional.

Just as when you use Data Loader to export or import records to Salesforce you are prompted to login. The user you log in with is the "context user" for those operations, granting access to records and defining the "Last Modified By". Similarly, the Mass Action Scheduler app will log in as a user to run Process Builder, Flow, Quick Actions, etc. operations too. But because these happen in the background and we do not want to insecurely store usernames and passwords then we instead securely store them as Named Credentials.

What user do the actions run as?

The context user that the Process Builder, Flow, Quick Actions, Email Alerts, Workflow Rules, and Apex run as is determined by the user who last activates the configuration, or who runs it manually, or by the Named Credential chosen when creating the Mass Action Configuration. Generally, you may want this to be an admin user but you can certainly create and use Named Credentials that use non-admin credentials.

What to do when an admin user becomes inactive?

If the now inactive admin user was the last person to activate a configuration then the scheduled apex job may fail the next time it runs according to this help article and idea.

To resolve this then as an active admin user deactivate then re-activate the other user's Mass Action Configurations (see next question). This will unschedule and reschedule the background jobs. If the Schedule Frequency of the configurations is set to Manual then I do not anticipate any problems because manual mode has no scheduled jobs related to it.

If the now inactive admin user's username and password are associated with a Named Credential referenced by a Mass Action Configuration then you will need to either:

  1. Update your Mass Action Configuration record to use a different Named Credential, or
  2. In Setup, edit the Named Credential associated with the inactive user, ensure the box Start Authentication Flow on Save is checked then save so that you are prompted to enter new credentials.

How do I activate or inactivate a configuration?

On the Mass Action Configuration detail page, click the Quick Edit button then check or uncheck the Active field then click Save. A Mass Action Configuration that is inactive will not run, even if you click the Run button to manually kick it off or if you use automation like Process Builder, Flow, or Apex to call the MA_RunConfigInvocable invocable apex class.

screen shot

How do I change how many records are processed at a time (batch size)?

On the Mass Action Configuration detail page, click the Quick Edit button then set the value for Batch Size field to be between 1 and 200 then click Save.

screen shot

What are Mass Action Logs? How do I know if an error occurs?

If there is an error when the Mass Action tries to run (e.g. submitting the background apex batch job) then the error will be reported here. Specific DML errors such as errors due to validation rules, required fields not being assigned, errors in a Flow, or otherwise any errors that occur within your selected action are not reported here because technically the app can't monitor them. Those errors will be reported however you normally receive such notifications, such as system emails to the administrator.

I recommend that you subscribe to receive Apex Exception Emails as some failures may prevent the app from ever getting a chance to report the issue via a Mass Action Log record.

You may also monitor the background batch jobs for errors.

Can I edit the Mass Action Configuration record in Classic or outside the Configure tab in Lightning Experience?

You shouldn't, no. Although technically you can update the Mass Action Configuration record through various means in Salesforce (it is just data), any method outside of the Configure tab or Quick Edit button in Lightning Experience are not supported and may cause undesired results or cause your configuration to become inoperable. This is why I provide the Configure wizard =)

How do I run a single or specific Workflow Rule like I can pick a specific Process Builder or Flow?

The Salesforce API does not offer an option to run specific Workflow Rules. Instead, all Workflow Rules are evaluated and those whose entry criteria are met are applied to those records. To ensure only a specific Workflow Rule runs then you will need to adjust the entry criteria.

If I schedule an action that updates the records, do my other Process Builders, Workflow Rules, Apex Triggers, etc. fire like normal?

Yes. If you schedule an action that causes records to be created, updated, or deleted then the same rules apply just as if you had created, updated, or deleted the records manually with Data Loader or any other means.

I don't see SOQL as a Source Type option.

Please add the SOQL picklist value to the "Source Type" field of the "Mass Action Configuration" object.

I don't see Apex as a Source Type option.

Please add the Apex picklist value to the "Source Type" field of the "Mass Action Configuration" object.

Timeout Error: Could not establish Postmate handshake

screen shot

This error often is because clickjack protection for Visualforce pages is enabled. Disable clickjack protection.

Error: System.CalloutException: Callout loop not allowed

This is a Salesforce Known Issue and limitation. See Unable to Run Flows That Make Callouts.

Error: System.HttpResponse[Status=Bad Request, StatusCode=400] ... An error occurred when trying to start a flow

Ensure the user represented by the Named Credential used by the Mass Action Configuration has Force.com Flow User checked on their user record.

Please check that the Connected App, Auth. Provider, and Named Credential are configured correctly per the instructions in the wiki.

Please check if the admin who last activated the process or flow received an error email which may include more details to help troubleshoot.

Error: System.HttpResponse[Status=Moved Permanently, StatusCode=301] ... An error occurred when trying to start a flow

Usually means there is a problem with the chosen Named Credential authenticating to Salesforce. Please check that the Connected App, Auth. Provider, and Named Credential are configured correctly per the instructions in the wiki.

Error: This app can't be installed (managed package installation)

If you receive the below error message during package installation then please see this Known Issue:

Mass_Action_Configuration_Record_Page: Component [force:relatedListSingleContainer] attribute [parentFieldApiName]: The parent record name is invalid.

Nothing seems to happen when my Mass Action Configuration runs and the Apex Jobs page lists 0 for Total Batches, Batches Processed, and Failures.

Ensure the user represented by the Named Credential used by the Mass Action Configuration has access to the list view or report being used.

screen shot

My question isn't answered here, how can I contact you about my question or feature request?

Please review the project issue tracker as your question may have already been asked/answered there and just hasn't made it to the FAQ yet. If you don't find what you're looking for please ask your question or request a feature by opening a new issue. Thank you!

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.