Open hwong103 opened 4 years ago
This is a known issue with the Automated Process user and scheduled flows invoking apex if you have a specific update enabled - https://help.salesforce.com/articleView?id=flow_considerations_trigger_schedule.htm&type=5
If you need a scheduled flow to invoke Apex code, don’t activate the Require User Access to Apex Classes Invoked by Flow critical update. When that critical update is activated, the scheduled flow fails when it invokes Apex.
I believe there is a fix planned but I don't know where that is being tracked.
As a workaround, you can add access to the apex classes of the autoproc user:
Query the profileId of the autoproc user with:
system.debug([select username, profileId from user where username LIKE 'autoproc%']);
Open the correct url:
https://[YourDomain].my.salesforce.com/_ui/system/user/ProfileApexClassPermissionEdit/e?profile_id=[AutoProcProfileID]
Add the apex classes and save
Not sure if anyone has come across this yet or if I'm missing something but the Extract Strings from Collection action seems to perform differently in a Scheduled Flow vs a Screen Flow. I've built it out exactly the same between the two different types of flows and the scheduled one gives me an error whereas the screen flow performs as expected
Error Occurred: Profile does not have access to: extractstringsfromcollection
Is there something different in how scheduled flows work?