function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sainath .chalamcherlasainath .chalamcherla 

hi SFDC team, Apex triggers

My Trigger scenario; Take two custom objects, okati master okati detail, when ever master email field updated all its detail records having email                                       as empty should get updated with masters email. 
Error   :    expecting a right parentheses, found 'RiskRel_mail__c' at line 10 column 7

Risk Object(Master)
Risk--Master Object
RiskRelationship(child)
RiskRelationship----child
trigger UpdateRelationship on Risk__c (After Update) {
set<Id> riskidtoquery = new  set<Id>();
for(Risk__c R: Trigger.new)
{
riskidtoquery .add(R.Id);
}
List<RiskRelationship__c> relationship = [select Id,RiskRel_mail__c from RiskRelationship__c where Risk__c IN:riskidtoquery];
for(RiskRelationship__c rr : relationship)
{
If(rr. RiskRel_mail__c =='' )( ERROR THROWING LINE)
{
  rr.RiskRel_mail__c = riskidtoquery.Risk_mail__c
}
}
Update rr;
}
Thanks and Regards,
sainath
sfdcMonkey.comsfdcMonkey.com
hi sainnath
use below line
rr.RiskRel_mail__c ==''
thanks
let me inform if it helps you
 
Jigna ShapariaJigna Shaparia
Hello Sainath,

Verify if there is a space in the below lines
riskidtoquery .add(R.Id);
rr. RiskRel_mail__c =='' 

Regards,
Jigna
sfdcMonkey.comsfdcMonkey.com
or you can also use
rr.RiskRel_mail__c == null