I have a flow which calls an approval process on a custom object. The approval process changes a picklist field to either confirmed or not fulfilled based on the response. I have an Apex trigger on the same custom object which sends an email, should theoretically run after the field is updated by the approval process. But the trigger does not work for some reason. Manually updating the picklist value however fires the trigger and the email is sent.

trigger OrderStatusUpdateTrigger on A7Order__c (after update) {
    OrderStatusUpdateHandler.handleTrigger(Trigger.oldMap, Trigger.newMap);


public class OrderStatusUpdateHandler {
    public static void handleTrigger(Map<Id, A7Order__c> oldOrders, Map<Id, A7Order__c> newOrders) {
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();
        for (A7Order__c updatedOrder : newOrders.values()) {
            A7Order__c oldOrder = oldOrders.get(updatedOrder.Id);
            if (oldOrder.Order_Status__c != updatedOrder.Order_Status__c) {
                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
                String recipientUserId = '0055g00000JyO8N'; 

                if (updatedOrder.Order_Status__c == 'Confirmed') {
                } else if (updatedOrder.Order_Status__c == 'Not Fulfilled') {
        if (!emails.isEmpty()) {

The field update on approval process has the re-evaluate workflow rules enabled. What am I doing wrong here? Is there a workaround?

  • Is the value of the field actually changing? Salesforce's automations won't perform a DML if no change actually occurred, which may be what you're experiencing.
    – sfdcfox
    Commented Jan 29 at 12:50
  • @sfdcfox yes, the value of the picklist is changing from the initial default value to Confirmed in the record but the trigger wont fire. Commented Jan 29 at 12:59
  • @sfdcfox The only workaround I can think of is to create another field which updates on the approval process, if this field is checked then update the records using a flow and then send the emails in that flow or call the trigger there. Not sure if that will work, seems like a lot of work to send an email. I could send an email directly from the approval process but I need to attach a pdf to the email after approval. Commented Jan 29 at 13:06


You must log in to answer this question.