How to submit approval via an ATF?

Jenny17
Tera Contributor

We have created a Record Producer that captures information from end-users.  When the record is submitted, it triggers a Flow that requests Approval.  

I am trying to create an Automated Test that does the following:

  • Opens the Record Producer
  • Populates the variables
  • Submits the Record Producer
  • Impersonates the Approver
  • Locates the Approval record
  • Approves the Request

However, my test fails when trying to locate the approval record.  I am querying the sysapproval_approver table, but the test does not seem to trigger the "ask for approval" step in the flow.

Can anyone please provide guidance? 

find_real_file.png

find_real_file.png

1 REPLY 1

Ananta1
Tera Expert

Hi Jenny,

You can try using these combination for querying the approval record:

Approval for = {{Step 6: Record Query.First record}}
and Approver = {{Step 7: Impersonate.User}}

As a side note, If the approver belongs to a specific group or any other relation like a manager then better to either create those users or query them instead of hardcoding them in impersonate step.

Thanks,