You need to sign in to do that
Don't have an account?
Nick White
How to copy one Boolean field, into another liked object via a Trigger
I have a Junction Object = Linkage__c
When field Confidential_Link__c [Checkbox:Boolean] is updated I wish for the trigger to update another Checkbox field in a linked Object, TripReport__c.
I am not an experienced Apex programmer, so trying to keep it simple and have the following.
trigger Update_TR_ConfFlag on Linkage__c (after insert, after update){
for(Linkage__c c : Trigger.new)
TripReport__c.Confidential_Flg__c = c.Confidential_Link__c;
}
...but I get: "Error: Compile Error: Expression cannot be assigned at line -1 column -1"
Can anyone help?
When field Confidential_Link__c [Checkbox:Boolean] is updated I wish for the trigger to update another Checkbox field in a linked Object, TripReport__c.
I am not an experienced Apex programmer, so trying to keep it simple and have the following.
trigger Update_TR_ConfFlag on Linkage__c (after insert, after update){
for(Linkage__c c : Trigger.new)
TripReport__c.Confidential_Flg__c = c.Confidential_Link__c;
}
...but I get: "Error: Compile Error: Expression cannot be assigned at line -1 column -1"
Can anyone help?
I hope there is a relationship from Linkage__c to TripReport__c.
If so, refer the code: Thanks,
Dhanya
All Answers
I hope there is a relationship from Linkage__c to TripReport__c.
If so, refer the code: Thanks,
Dhanya
Many thanks.