You need to sign in to do that
Don't have an account?
Kishore B T
Test Class help: Approval Process
I am fetching all the approval comments from afterupdate trigger. But in my test class i dont know how to cover the process steps . My Approval Process has 2 step approvers.
List<Planner__c > listtp=[Select v.Id,v.name, v.Approved_Amount__c ,(Select Id, IsPending, ProcessInstanceId, TargetObjectId, StepStatus,OriginalActorId, ActorId, RemindersSent, Comments, IsDeleted, CreatedDate, CreatedById,SystemModstamp From ProcessSteps order by createdDate desc limit 1) From Planner__c v where id =: Trigger.new[0].id];
I am not able to cover inner sqol query (Processsteps)
for(vepl_TravelPlanner__c c : listtp) { for (ProcessInstanceHistory ps : c.ProcessSteps)
{ // Get the Comment section from approval Object
. If(ps.Comments!=null0)
{ //My logic. } }
so can someone guide me how to use ProcessSteps.
List<Planner__c > listtp=[Select v.Id,v.name, v.Approved_Amount__c ,(Select Id, IsPending, ProcessInstanceId, TargetObjectId, StepStatus,OriginalActorId, ActorId, RemindersSent, Comments, IsDeleted, CreatedDate, CreatedById,SystemModstamp From ProcessSteps order by createdDate desc limit 1) From Planner__c v where id =: Trigger.new[0].id];
I am not able to cover inner sqol query (Processsteps)
for(vepl_TravelPlanner__c c : listtp) { for (ProcessInstanceHistory ps : c.ProcessSteps)
{ // Get the Comment section from approval Object
. If(ps.Comments!=null0)
{ //My logic. } }
so can someone guide me how to use ProcessSteps.