You need to sign in to do that
Don't have an account?
SS Karthick
Passing record id and group id
Hi folks,
Can anyone tell me how to pass the group id and record id from trigger to apex class
like my apex class is
Public static passMethod(Id recordId,Id groupId)
Please Help!
Can anyone tell me how to pass the group id and record id from trigger to apex class
like my apex class is
Public static passMethod(Id recordId,Id groupId)
Please Help!
Is this what you are looking for?
All Answers
Hi Karthick,
Sample Code:
Trigger:
trigger Sample on Opportunity (before update, before insert) {
if (Trigger.isInsert) {
SampleApexClass.SampleMethod(Trigger.new);
} else if (Trigger.isUpdate) {
SampleApexClass.SampleMethod1(Trigger.new, Trigger.old);
}
}
Apex Class:
global class SampleApexClass () {
global static void SampleMethod(List<Opportunity> NewOpps) {
/* trigger code*/
}
global static void SampleMethod1(List<Opportunity> NewOpps, List<Opportunity> OldOpps) {
/* trigger code*/
}
}
So like this, you can fetch each newly inserted/updated fields value in your controller.
And don't forget to mark this answer as best, if answer this helps you :-)
--
Regards,
Grazitti Team
Web: www.grazitti.com
Is this what you are looking for?