Here’s a complex one. Have at it, friends!
Interaction Object is a child of Case Object is a child of Patient Object. There is a lookup relationship between Appointment Object and Interaction Object.
I have a Scheduling Page with a calendar component which has the AppointmentModel as its event source. On calendar click I load a custom popup, and the user fills in data into the AppointmentModel. Then, the user can click a button in the page title component on the popup to save the data and open a second popup, which has a page include with the following:
I have a table on PatientModel, with a drawer containing a table on the CaseModel, with another drawer containing a table on the InteractionModel.
I have a global action button on the PatientModel table that adds a new row to PatientModel with default values from an AppointmentModel.
I have a global action button on the CaseModel table that adds a new row to the CaseModel with default values from an AppointmentModel.
I have a row action on the CaseModel table that adds a new row to the InteractionsModel with default values from an AppointmentModel.
I have an action set up in the PatientModel such that when a row is added, a new row is created in a CaseModel with values from the AppointmentModel.
I have an action set up in the CaseModel such that when a row is added, a new row is created in the InteractionModel with values from the AppointmentModel.
If I run the page-include as a stand-alone page, this works great. However, when I run it through the Scheduling Page through the page include, not so much.
PROBLEM: When I use any Create New Row action, it adds a number of rows to the child object equal to the number of times that I’ve opened the popup since load of the parent page.
For example:
I create an appointment, save and open the Assign Appointment popup with a button. There is nothing in the PatientModel (and therefore nothing in its child or grandchild).
I run the New Patient action, and get this result:
As expected, a row is added to the PatientModel with values from the AppointmentModel, which triggers a row being added to the CaseModel, which triggers a row being added to the InteractionModel. Perfect.
Now, if I close the popup, reopen it (doesn’t make a difference if it’s the same context row on AppointmentModel, or a different one), and run the same action a second time, here is what I get:
Two rows in CaseModel, and in each of them, two rows in InteractionsModel (4 total).
If I close it and open it again, I can create three identical rows in the CaseModel, each with three identical rows in the InteractionsModel, all with a single click!
Strange, right?
Here’s the basic question:
Why would having a page include popup from a calendar popup cause duplication of the ''create new row" action once for every time the popup has been opened since pageload?
Question
Add new row action adds multiple rows

Translate
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.