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

error while delete ::::::self_reference_from_trigger.

trigger deleteTempAcc on Account (after update) {


account acctodelete=[select Oracle_Company_ID__c from account where ];

delete acctodelete;


hi all,
i need to delete account when some field in it got updated.
in following example when oracle_company_id get updated, account should be deleted.
but i am getting error:: self_reference_from_trigger.
please help me out.
A record can't delete itself in it's own trigger.  If the field the deletion is relying on is being updated by a person then the person should just udpate the field and delete the account themselves.  If the field is being updated by another trigger then maybe have that trigger delete the account?