You need to sign in to do that
Don't have an account?
Bhyrava prasad
process builder - apex class
hi
From process builder can we call an apex class which has a method to create a record in a object ?
From process builder can we call an apex class which has a method to create a record in a object ?
check below sample code once, Thanks
Shaik
All Answers
yes, you can call that method, but declare that method as @InvocableMethod Annotation.
Example:
Kindly mark this as solved if the reply was helpful.
Thanks
Shaik
public class InsertStudentMaster
{
@InvocableMethod
public static void insertNewStudentMaster(List<ID> ids)
{
List<Student_master__c> StudentMasterNew = [SELECT name,Age__c, City__c, Comments__c, India__c, Email__c from student_master__c WHERE Id=:ids];
if(!StudentMasterNew.IsEmpty())
{
List<Student_master__c> cloneList = StudentMasterNew.Clone();
insert cloneList;
}
}
}
check below sample code once, Thanks
Shaik