I have a requirement for updating two picklist value if a checkbox is ticked.
- Feedback__c is one object which has Status__c and Resolution__c picklists.
- Feedback_Comments__c is another that will have a trigger and the checkbox.
If checkbox in Feedback_Comments__c is ticked then status in Feedback__c should be set to 'Closed' and Resolution to 'Fixed'.
I'm new to triggers. Following is my code.
trigger UpdateStatusResolution on Feedback_Comment__c (before insert) {
for (Feedback_Comment__c fc: Trigger.new) {
if(fc.Comment_closes_Feedback__c=true )
Feedback__c.Status__c = 'Closed';
Feedback__c.Resolution__c = 'Fixed';
}
}
Error: Compile Error: Expression cannot be assigned at line -1 column -1
Please guide me.
Thanks
Best Answer
Try