On Object Enter works, but you need to attach the script trigger to the popover "balloon" and not the popover's button.
I have the same question, but with a bit of twist...
I set the trigger to On Object Enter...and the script creates a new record that I want populated via the fields on the popover.
Popover opens for a millisecond
I have now entered, so a new record is made
and the focus goes tho the new record (list view) and the popover is closed.
So I add a GoToObject step in the script to get the popover open again...
and I've now entered it again so a new record which then launches the script again...100 new records *presto*.
How do I get the popover to open on a new record , that I can fill within the popover?
I feel like I'm missing something really obvious...
That kind of problem where a script in a script trigger causes a script trigger has been possible since script triggers were introduced.
I solved it by checking a global variable only used in this script and if its set then exit script. If not set the script sets it and then does the other stuff. If the script is called again before the end of the script clears the global variable then it exits and the script continues. Just remember to clear it at the end of the script.
For anyone who finds the thread later...
I did use a global variable.
The OnObjectEnterscript now Checks the variable and
If it is empty or zero, make a new record and set the variable to 1, go to an object in the popup (to reopen the popup) and exit script.
If the variable is 1, set the variable to zero and exit script.
This makes a new record (which closes the popup), reopens the popup with the variable =1, reruns the script OnObjectEnter and the script dumps out without reclosing the popup.
There oughta be an easier way...and there might be...but this way works fine.
If the goal is to use the popover to ADD NEW RECORD, I find it easier to place Global fields on the popover instead of displaying an actual new record from a table. You can use the OnObjectEnter trigger to set all Globals to "". Use the Global fields to capture the data you need for your new record. Then place a button on the popover to run a script to add the new record based on the values in your Global fields.
I consiered that approach...definitely functional...but opted for one script instead of a bunch of extra globals.
Hi So now it is the end of Feb 2014 and are we any smater about adding a new record using a popover? Adding globals and scripting to add a new record seems like a long way around. A simple script to add a new record and then return in the same script to the original layout seems easy.
That being said, why are popovers not documented better? If they provide such a noval approach to popups why not have a section that explains the options better in the documentation. I've looked at all the documentation and what I found is minimal? Does snyone have a better reference than the Help, and the user guides?