You need to sign in to do that
Don't have an account?
Apex-Trigger
Apex-Trigger-CompileError-'Type is not visible: account at line 2 column 7'
trigger AccountDelete on Account (before delete) {
for(account a: trigger.old)
{
if(a.Name!='todelete')
{
a.addError('You Dont have access to delete this account');
}
}
}
I dont know what is wrong in that .What it means can any one help ...?
Hi,
I have tried your code at my end .its working fine.
If you have any issue. Let me know with error message or with screen shot.
Hi jain ,
Is it working fine for you , can you tell me what changes have you made , I tried a lot but ,i cant figure it out .
trigger AccountDelete on Account (before delete) {
for(account a: trigger.old)
{
if(a.Name!='todelete')
{
a.addError('You Dont have access to delete this account');
}
}
}
...What changes you made in this code .
Thanks ,
Janarthanan.M
Hi jain ,
I have attached a screen shot of what i got ..
Thanks ,
Janarthan.M
Hi,
Are you using admin credential for this or using any user credential. So may be that user don’t have right of that object or field. Hence please check you OWD setting and field level security.
Hi ,
I am using as sys admin . sys admin has every rights , moreover this is sobject , I dont know what is wrong .You said that it is working fine for you , can you tell me how you done this thing .
Thanks ,
Jana.M