In searching for solutions online, I’m obviously not asking the right questions… going in circles… round and round… can anyone help?
Can I prevent a portal record commit, until the user either clicks a commit button in the portal or exists the enveloping record.
The long story
Here’s part of my layout…
The below detailed portion of this layout is a single portal row filtered with IsEmpty ( IDPK#TimeSlip) used to create a TimeSlip record. (Thanks to philmodjunk and rgordon for teaching me how to use this trick.)
It worked as expected.
Click the green button to trigger a start timestamp and then add a TimeSlip note, or add a JobNote (another single filtered portal row), or navigate to a different tab, and back before pressing the red stop button to enter a stop time stamp.
I thought I had the layout licked…
BUT if the user clicks off a field, the record commits. I understand that is how it is supposed to work. But of course now the portal presents a new empty record. And I now have a record without a Stop timestamp (or perhaps a note). Users can see TimeSlip records in a portal in the Time Logs tab. But this should be for the exceptions not a regular occurrence.
So I thought the best thing to do was create a script to prevent the portal record from committing unless all fields are filled.
The below script (triggered by OnObjectExit), does the trick to prevent a half-completed portal record from committing. There’s no OnRecordCommit trigger for a portal field?
BUT, now the user cannot get out of the portal to add a JobNote or look up information on other tabs etc. Solving one problem created another.
Flawed logic? Wrong garden path?