function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
hi,
i need to write trigger on position object
the position object contains check box (Travel Required)
and Job Application object contains status field
when i checked the Travel Required check box the trigger should be fired so that status field in Job Application should be changed to Rejected
there is a lookup relation between those two objects
whenever the checkbox of one position is checked the related Job Applications status field muct be changed to "Rejected"
can anyone help me pls
Hi
Try this...
trigger UpdateStatusInJobApplication on Position__c (after update){ List<Job_Application__c> jobApp = new List<Job_Application__c>(); if(Trigger.new[0].Travel_Required__c != NULL){ jobApp = [select Id , Name ,position__c,Status__c from Job_Application__c where position__c =:Trigger.new[0].Id]; for(Job_Application__c job :jobApp){ if(Trigger.new[0].Travel_Required__c == true){ job.Status__c ='Rejected' ;
jobApp.add(job);
} } update jobApp ; }}
Did this post solve your problem If so please mark it solved otherwise let me know about your Issue
Thanks
asish
i already done recruiting app i am working on triggers
its working
thank you
Hi
Try this...
trigger UpdateStatusInJobApplication on Position__c (after update){
List<Job_Application__c> jobApp = new List<Job_Application__c>();
if(Trigger.new[0].Travel_Required__c != NULL){
jobApp = [select Id , Name ,position__c,Status__c from Job_Application__c where position__c =:Trigger.new[0].Id];
for(Job_Application__c job :jobApp){
if(Trigger.new[0].Travel_Required__c == true){
job.Status__c ='Rejected' ;
jobApp.add(job);
}
}
update jobApp ;
}
}
Did this post solve your problem If so please mark it solved otherwise let me know about your Issue
Thanks
asish
All Answers
i already done recruiting app i am working on triggers
Hi
Try this...
trigger UpdateStatusInJobApplication on Position__c (after update){
List<Job_Application__c> jobApp = new List<Job_Application__c>();
if(Trigger.new[0].Travel_Required__c != NULL){
jobApp = [select Id , Name ,position__c,Status__c from Job_Application__c where position__c =:Trigger.new[0].Id];
for(Job_Application__c job :jobApp){
if(Trigger.new[0].Travel_Required__c == true){
job.Status__c ='Rejected' ;
jobApp.add(job);
}
}
update jobApp ;
}
}
Did this post solve your problem If so please mark it solved otherwise let me know about your Issue
Thanks
asish
its working
thank you