You need to sign in to do that
Don't have an account?
Matan Alon
Hide delete button base on task subject value
Hi,
I'm trying to figure how to hide the delete button in the task detail page when the subject field value equal to 'xxxx' and the profile not equal to admin.
I know i need to custom the delete button with a Visualforce Page but i dont have any clue on how the script needs to look like.
Please help me with that,
Thanks in advance,
Matan.
I'm trying to figure how to hide the delete button in the task detail page when the subject field value equal to 'xxxx' and the profile not equal to admin.
I know i need to custom the delete button with a Visualforce Page but i dont have any clue on how the script needs to look like.
Please help me with that,
Thanks in advance,
Matan.
http://www.infallibletechie.com/2013/12/how-to-disable-and-enable-button-in.html
http://www.infallibletechie.com/2013/01/how-to-disable-button-in-visualforce.html
I tried to use them but i dont know how to custom them to my needs.
Any help we be appreciated.
Matan.
something like:
trigger prevendTaskDelete on Task(before delete){
for(Task t : trigger.new){
if(check your conditions){
t.fieldName.addError('You cannot delete this record');
}
}
}