You need to sign in to do that
Don't have an account?
Sangram Phadke
Calling apex class methods from trigger Plz help...
--------------------------Apex Class---------------------------
public class IA_scrum_apex_class {
public IA_Scrum__c scrum_class_var{get;set;}
public boolean chk1 { get; set; }
public IA_Scrum__c scrumtime{get; private set;}
public IA_scrum_apex_class(ApexPages.StandardController controller) {
scrumtime = new IA_Scrum__c( Date_time_Scrum__c = DateTime.now() );
scrum_class_var = new IA_Scrum__c();
if(chk1==true){
scrum_class_var.Dump_test_field__c = 'Test check';
insert scrum_class_var;
}
}
}
------------------------Trigger---------------
trigger IA_Scrum_Trigger on IA_Scrum__c (before update,before insert) {
for(IA_Scrum__c testclassapex1 : trigger.new){
//IA_scrum_apex_class =new IA_scrum_apex_class();---Show this error------Variable does not exist: IA_scrum_apex_class---------
// need sum vaue to be show & read visual force page vaues in Apex class then it invoked in trigger...........
}
public class IA_scrum_apex_class {
public IA_Scrum__c scrum_class_var{get;set;}
public boolean chk1 { get; set; }
public IA_Scrum__c scrumtime{get; private set;}
public IA_scrum_apex_class(ApexPages.StandardController controller) {
scrumtime = new IA_Scrum__c( Date_time_Scrum__c = DateTime.now() );
scrum_class_var = new IA_Scrum__c();
if(chk1==true){
scrum_class_var.Dump_test_field__c = 'Test check';
insert scrum_class_var;
}
}
}
------------------------Trigger---------------
trigger IA_Scrum_Trigger on IA_Scrum__c (before update,before insert) {
for(IA_Scrum__c testclassapex1 : trigger.new){
//IA_scrum_apex_class =new IA_scrum_apex_class();---Show this error------Variable does not exist: IA_scrum_apex_class---------
// need sum vaue to be show & read visual force page vaues in Apex class then it invoked in trigger...........
}
Please check if the above mentioned code can help you.
I appreciate for above code.