Activity Forums Salesforce® Discussions Can we change values in after trigger in salesforce?

  • Radhakrishna

    Member
    April 21, 2017 at 9:06 am

    Hello,

    An AFTER trigger is typically used to update something other than the row being updated. For example, if you wanted to log the fact that an update had been made, an AFTER trigger is ideal.

    To change the value of a column as it is being inserted, you need to use a before trigger. For example

    CREATE TRIGGER modify_column BEFORE INSERT ON mytable
    SET @column = value;

    Where value is a query, pre defined value or NEW.column

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos