You need to sign in to do that
Don't have an account?
keerthana chowdhary
line 10:91 no viable alternative at character '_'
trigger percantageupdate on appraisal__c (after insert,after update)
{
set<id> sd = new set<id>();
for (appraisal__c a :trigger.new)
{
sd.add(a.appointments__c);
}
list<appointments__c> app= new list<appointments__c>();
app=[select id,of_increment__c,amount_increment__c,(select id,ctc__c from appraisal__c __r) from appointments__c where id IN: sd];
for(appointments__c c: app )
{
c.of_increment__c=c.ctc__c;
c.amount_increment__c=c.ctc__c;
}
update app;
}
help me urgent
{
set<id> sd = new set<id>();
for (appraisal__c a :trigger.new)
{
sd.add(a.appointments__c);
}
list<appointments__c> app= new list<appointments__c>();
app=[select id,of_increment__c,amount_increment__c,(select id,ctc__c from appraisal__c __r) from appointments__c where id IN: sd];
for(appointments__c c: app )
{
c.of_increment__c=c.ctc__c;
c.amount_increment__c=c.ctc__c;
}
update app;
}
help me urgent
app=[select id,of_increment__c,amount_increment__c,(select id,ctc__c from appraisal__c __r) from appointments__c where id IN: sd];
in place of appraisal__c __r write child relationship name.
Thanks
Gyani
Gyanendra is right you need to check the relationship name ,Also you need to check one more thing you can not access child object field directly with parent object varibale from inner query .
Check below code how ever you need to check the relationship name and child object count .
Let me know if it helps !!
Thanks
Manoj