
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 06:49 AM
Hi,
I have an event table where I store events, and allow user to register for the event to receive a calendar invitation.
Registration is done via an UI action using the logged in users SysId, the current event SysId and putting them into a ScriptInclude where a registration record is created in a separate table using gliderecord. As far as I can see, the UI action does no save to the Event table, only to the registration table.
Some fields on the Event record should be filled to complete the calendar invitation, this is done by an admin. Admin wants a reminder onSubmit to fill out the relevant fields (doesn't want mandatory fields due to only some events being open for invites). So I created an OnSubmit client script that checks event type, and if those relevant fields are empty, then sends a confirm message reminding to fill out fields (OK to proceed with save and Cancel to go back).
My problem is now when a user clicks the Register UI Action, somehow the client script is triggered and the message shows up. I was assuming the script would only run on an actual save/submit in the Event table, not on a save that only goes to another table. Is there a way to stop the client script to trigger the message in this case?
Solved! Go to Solution.
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 03:15 PM
Yes. "Submit" does not mean "submit to the table", it means "submit to the server".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 03:09 PM
Even when it's running a server script towards a different table?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 03:15 PM
Yes. "Submit" does not mean "submit to the table", it means "submit to the server".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2019 01:52 AM
Thank you, then it makes sense to me 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 02:16 PM
OK so I ran a test on a different instance:
OnSubmit client script to check for empty location, popup message to confirm. OK to submit, cancel to go back.
UI action with a name and action name and nothing else. Clicked button and got the popup.
I would never have guessed that a client script set for "onSubmit" would run when nothing is submitted except the "click" of a button that makes absolutely nothing happen on any table.
SO, I will either have to add a condition on the client script so it doesn't run for users without write access, or find a completely different way to ensure/remind the admins/creators which fields they really need to fill out.