You need to sign in to do that
Don't have an account?
AxxxV
Prevent undelete operation using trigger
How can I restrict an ability to restore records froma Recycle Bin?
I tried the following code it did not work. This is for 'after undelete' trigger. The 'before undelete' is not supported as far as I can see.
I tried the following code it did not work. This is for 'after undelete' trigger. The 'before undelete' is not supported as far as I can see.
Code:
if(Trigger.isUndelete){ for(SCS_Client_Time_Series__c clts : Trigger.old){ clts.addError('Not allowed to restore Time Series from Recycle Bin. Create new Time Series record instead.'); }
}
You can try to delete in the trigger or in a @future call