@istest private class Recruitervalidation_test{ public static testmethod void Recruitervalidation_test() { Recruiter__c rc = new Recruiter_c(); rc.status__c='waiting'; rc.jobname__c=''; rc.joblocation__C='INDIA'; rc.jobtype__C='Technical'; //see here it can be __c or as it is insert rc;
Hi Satyam,
Exactly i don't know how to get url in trigger try this
s.adderror('< a href = \' www.shivasoft.in \ ' > This is Test < / a >. ');
Regards,
Rajesh.
All Answers
Hi ,
Many many Thanks for your help, Its working pretty fine and giving 80% code coverage.
Unfortunately i forget to ask one more thing user want that
"In error message he want the record detail page link in trigger"
How i can do this ?
Thanks:)))
Hi,
Thanks its working pretty fine
Unfortunately i forget to ask one thing that i want to give record detail page link so how i can do this ,
How i can do this?
Trigger Recruitervalidation on Recruiter__C (before Update) {
for (Recruiter__c a : Trigger.new) {
system.debug('a.Status__c '+a.Status__c);
system.debug('a.jobname__C '+a.jobname);
if ((a.Status__c == 'waiting')&&(a.jobname__c==null)) {
a.addError('Please fill the "Jobname" for the Job');
}
else if ((a.Status__c == 'Pending')&&(a.Jobdesc==null)) {
a.addError(‘Some Error Message');
}
}
}
Thanks:))))
Hi Satyam,
Exactly i don't know how to get url in trigger try this
s.adderror('< a href = \' www.shivasoft.in \ ' > This is Test < / a >. ');
Regards,
Rajesh.