How can I add a record to a related list with ATF

mike275
Mega Expert

I have a custom app that has 2 tables.  One table is a one-to-many table.

In ATF, I have a test that adds a record to the parent table.

How do I then add a test step to open a form for the child record and carry on from there?

In other words, how do I make ATF click the "New" button below so I can make it set values on that form?

find_real_file.png

1 ACCEPTED SOLUTION

Giles Lewis
Giga Guru

I am assuming that your child form has a field which is a reference to the parent.

I am assuming that when you click the "New" button, it opens the child form, and the parent field is auto-populated. 

To test creation of a child record, use an "Open a New Form" step immediately followed by a "Set Field Values". The "Set Field Values" will specify the value of the parent by referencing the test step that created the parent record.

 

View solution in original post

7 REPLIES 7

I cannot write the Reference field of this association through ATF,too.

Do you have any other solutions?

Hello, what if my associated field is readonly? I cannot write the Reference field of this association through ATF.

Do you have any other solutions?

Giles Lewis
Giga Guru

A couple of other options:

  • You could create an alternate view of the child form that contains the parent field, but is not the view that your end-users would see
  • Instead of Open New Form, you could create the child record using Server > Record Insert