Aptitude (12) C (2) C++ (10) CSS (1) Data Structure (2) English (7) General (14) HTML (3) Integration (1) Itinerary and Travel Cost (1) Java (29) JQ (5) JS (5) JSP (1) Lightning (14) logical (3) Math (1) Music Notation (17) MySql (4) Network (1) Regex (1) salesforce (131) Servlet (4) SF Admin (31) SF Dev (102) SQL (4) SQL_SERVER (1) StudyPoints (2) ytChannels (2) अन्ताक्षरी (4)

Trigger Context Variables


  1. isExecuting--Returns true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call.
  2. isInsert
  3. isUpdate
  4. isDelete
  5. isUndelete--Returns true if this trigger was fired after a record is recovered from the Recycle Bin (that is, after an undelete operation from the Salesforce user interface, Apex, or the API.)
  6. isBefore--Returns true if this trigger was fired before any record was saved.
  7. isAfter--Returns true if this trigger was fired after all records were saved
  8. new--Returns a list of the new versions of the sObject records.Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.
  9. old--Returns a list of the old versions of the sObject records.
    Note that this sObject list is only available in update and delete triggers.
  10. newMap--A map of IDs to the new versions of the sObject records.
    Note that this map is only available in after insert, and update triggers.
  11. oldMap--A map of IDs to the old versions of the sObject records.Note that this map is only available in update and delete triggers.
  12. size--The total number of records in a trigger invocation, both old and new.
  13.  Table for defining contaxt variable values "NULL" or "NOT  NULL" 
  14. TCV*
    Before Insert
    After Insert
    Before Update
    After Update
    Before Delete
    After Delete
    After Undelete
    New
    NOT NULL,
    MODIFIABLE
    NOT NULL
    NOT NULL,MODIFIABLE
    NOT NULL
    NULL
    NULL
    NOT NULL
    Old
    NULL
    NULL
    NOT NULL
    NOT NULL
    NOT NULL
    NOT NULL
    NULL
    newMap
    NULL
    NOT NULL
    NOT NULL
    NOT NULL
    NULL
    NULL
    NOT NULL
    oldMap
    NULL
    NULL
    NOT NULL
    NOT NULL
    NOT NULL
    NOT NULL
     NULL
*TCV->Trigger Context Variable

Events
trigger.old
trigger.oldMap
trigger.new
trigger.newMap
before insert
after insert
before update
after update
before delete
after delete
after undelete




No comments: