You need to sign in to do that
Don't have an account?
Lakshit Aswal
A very simple trigger.
I want to update by incrementing the total_applicant(Type:Number, object: Job__c) field by 1, which is to be done only after a record is inserted or updated in the Candidate__c object.
I can't figure out why line 7 is always red(errorneous) which leads to no change in the databse.
A little help would be appreciated. A newbiew here by the way.
This field is making me go crazy. It won't get changed.
A very simple trigger.
I want to update by incrementing the total_applicant(Type:Number, object: Job__c) field by 1, which is to be done only after a record is inserted or updated in the Candidate__c object.
I can't figure out why line 7 is always red(errorneous) which leads to no change in the databse.
A little help would be appreciated. A newbiew here by the way.
Did this field level security permission FLS to Total_Applicants__c?
All Answers
You forgot to add JoB_Id__c in your candidate object test data record.
Hope this helps!
It's been there since the object creation. It's a master-detail relationship with the Job__c object.
I have tested what is being retrieved from Job_Id__c and its the Record ID, and thats not a problem anyway as the SOQL query is working fine.
The only problem is with the Job__c object's instance (jobs) which is not working as expected.
myfiosgateway (http://myfiosgateway.club)
update job__c;
To update the record you need to perform a DML operation. Without the DML operation the value won't be updated in the database.
Did this field level security permission FLS to Total_Applicants__c?
And well I achieved this functionality by RollUp summary anyway, but working out with FLS worked, so switching back to trigger.
Cheers,
Lakshit.