
for tha purpose i wrote on triger
trigger position on Position__c (Before Insert, Before Update ) {
for(Position__c p : Trigger.New){
IF(p.Position__c!='Null')
p.addError('U must be select position either IT or NON_IT');
}
}
but it didnt work how it will be write code please tell me
4 个回答
Hi Veera, Try this.
trigger position on Position__c (Before Insert, Before Update ) {
for(Position__c p : Trigger.New){
if(p.Position__c == null )
p.addError('U must be select position either IT or NON_IT');
}
}
This should do the trick and please consider Jeff's suggestion.
Thanks,
Naval