AnsweredAssumed Answered

Create New 'Related' Record in Popover

Question asked by lcot17 on Feb 26, 2016
Latest reply on Feb 5, 2017 by philmodjunk

Hi -

 

I was wondering if someone could possibly spend 5 minutes with me to walk me through the following problem:

How to create a new / go to a record of a related table in a popover?

 

I have a 'Customers' table and a 'Customers Log' table.

In the customers table, I have a portal showing the related records from the 'Customers Log' table.

 

I would like to:

1) Click a 'Add to Log' button to open a popover > create a new record with the CustomerIDpk set > and allow me to enter the data into that record from the popover > click a save button to commit the record.

2) Click a record in the 'Customer Log' portal table > this opens that related record in the popover.

 

Currently my issue is that I have a loop where script triggers are executing over and over again creating an infinite number of empty log records. I know theoretically that it is because I am not correctly disabling script triggers - but practically I am not 100% on how to do it.

 

I need to know how to:

  1. Correctly set a global field for $$scriptTrigger = "on" ?
  2. How to structure the scripts and triggers and what 'on load / on open / on exit' to set them on?
  3. What is the content of each script that I require in order to make this work?

 

Effectively - as a practical example - the 'Invoices' starter solution. When on the 'New Invoice' layout I select a customer > click on New Customer. I would like that functionality to both create a new customer log and to also view the customer log data for a record I click in the list.

 

Screen Shot 2016-02-26 at 20.33.50.png

 

Screen Shot 2016-02-26 at 20.36.15.png

Outcomes