We have an auto launched flow which whenever a work order is rejected by a tech, it auto-dispatches work order to another available tech. We're calling the auto launched flow through a process builder which is trigger by a field update when the WO is rejected.
The auto dispatch is working great if the WO is rejected by an internal CSR on behalf of the service provider but when the service provider rejects, it is not auto dispatching. It feels like the auto launched flow is respecting the permissions and access of the service provider instead of running in system mode. I tried multiple ways but with no success. How do I make sure to run it in system mode but not in user mode?
Here's how the process works: Service Provider Rejects a WO by clicking on Reject button in the community which calls an on screen flow where he specifies the reason for his rejection. I have an invocable apex action at end of the flow which updates the field, which triggers the process builder which then calls an auto launched which dispatches the work order. Everything works well If user is a CSR but not when the user is a Service Provider. I'm using without sharing keyword as well.