This is sort of an extension from (Create New 'Related' Record in Popover) but it has kind of transformed into a different question now after I have eventually made some progress.
I have attached a database I have quickly developed as a theory test. It is a Customer table/layout where I can create a log of all communications between myself and them. (Customer Log)
I have a set up at the moment where I have the following capability:
- Using Global Fields, I can create a new customer log record from a popover button.
- Using a button in the Customer Log portal, I can open that record in the same popover but on a different slide of a Slide Control object. Giving me 2 objects in the slide control ... 'New Log' and 'Existing Log'.
Problems with my database:
- Clicking 'ADD TO LOG' button should automatically go to the 'New Log' object and display blank fields ready for data entry.
- By creating a script trigger when the button is clicked, it removes the ability to open the popover to show existing records on slide 2 as it will always open on the 1st slide.
- I want to be able to have a 'cancel' button on each slide to cancel or confirm changes / fields.
- Add Log: Save button validates the data and closes the popover. Fine
- Add Log: Cancel button gives a 'warning' - option 2 means data entry continues and option 1 means the popover is closed and record deleted.
- Add Log: Clicking off the popover (closing) - Again, if data has started to be entered it prompts a warning message to either continue entry or close and delete the record.
- Existing Log: Making changes to a number of fields can all be reverted by clicking a 'Cancel' button or clicking off the popover and confirming a warning dialog
- Existing Log: Data is only committed when the 'Save' button is clicked (no dialog) and the popover closes.
My question is: How do I solve the above? Am I making life difficult for myself by merging 2 forms on popovers and slide control objects?
How do I avoid conflicts with script triggers here and action scripts?
Thank you in advance!