You need to sign in to do that
Don't have an account?
Viasur-
Trigger not launching ???
Hello all,
Can anyone let me know what is making this simple trigger not to firing?
trigger DeleteContact on Contact (before delete){ for(Contact c : Trigger.old){ String profileId = UserInfo.getProfileId(); if(c.AccountId!=null && (profileId!='00e11000000Df7mAAC') && (profileId!='00e11000000Df8aAAC') && (profileId!='00eb0000000rNRWAA2')){ c.addError('You don\'t have sufficient rights to delete this record!'); } } }
Thanks in advanced!!
Just to confirm, hope your trigger is active!!
Hey ... yes it is :)
How did you check if the Trigger is firing or not?, don't depend on the Error message to show up, I would first insert a debug statment in the trigger and check this in the Dev console after delteing a contact, I would also make sure the Contact is actually getting deleted and making sure nothing is blocking the trigger from firing - i.e workflow rule.