function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
camelUsercamelUser 

process builder apex call

I am trying to create a process using the salesforce process builder that triggers an apex class method when a  user changes there password.

The process type is: A record changes

The recored is: User

Record type

The condition is: User.LastPasswordChangeDate is Changed (True)

condition


The Immediate Action is: pass [USER] to the apex class invocable method
 

action

My apex method is:

@InvocableMethod(label='Trigger user refresh call' description='Trigger the user refresh when the password is manualy changed')
    public Static void triggerUserRefresh(List<User> user){
        if(user.isEmpty()){
            System.debug(InvocableMethod triggerUserRefresh user list was empty, this integration was not triggered.'); 
        }else{
        	System.debug('Integration user refresh has been manualy triggerd.'); 
            User singleUser = user.get(0);
            
            String username = singleUser.Username;
            setVariables();
            String message = 'The Salesforce integration user has been has been manualy triggerd, create new ticket';
            notifyOfUserReset(message); 
        }
    }

The issue: This process never seems to run when a user changes there password, I see no record of anything running from the developer console log.

I know the method works as I am able to test that independently from the process and i get the result I expect.

Am I doing something incorrect?

Is there a was to enable more logging to see if the process is being triggered / the failure?

Any help would be greatly appreciated.

Ravi Dutt SharmaRavi Dutt Sharma
Do you want to try something simple, like "No criteria" and then call your apex class?