Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script that sets script trigger (record protection)

Featured Replies

Hi guys,

I made a little script to protect fields from being modified (fields upon which I cannot put the option "prohibit modification on data entry") which triggers OnObjectEnter:

Beep

Show custom dialog ["Error!"; "This field is not modifiable!"]

Commit Records/Requests[skip data entry validation; No dialog]

Now let's say I make an invoice, I fill all the fields needed (customer's invoicing address, orderID, etc.) and when I'm done I'd like to have a button labeled "confirm Invoice" which triggers the script above on the invoice fields I just filled, so that the invoice I created is protected from future modifications.

On script steps I can't see such a command, I was wondering if there's a way to accomplish this.

Thanks a lot!

You can't assign a script trigger programmatically, but you can have your button set a status field like “InvoiceIsConfirmed” to a value ("1"), which the trigger script can check on.

If [ MyInvoices::InvoiceIsConfirmed ]

Commit Records/Requests[skip data entry validation; No dialog]

Beep

Show custom dialog ["Error!"; "This invoice has already been finalized and cannot be edited!"]

Else

Exit Script []

End If

so that the invoice I created is protected from future modifications.

To protect records from modification use record level access restrictions. Script triggers work on field objects *on particular layouts*. There is nothing preventing the records from being changed from another layout.

  • Author

Thanks for your replies guys.

@eos: nice hint, I'll try to set up a script for invoice Confirmation that acts like you suggested.

@Vaughan: shall I personalize record level access restriction from Manage DB-> Security? The thing is, I want the same user to be able to "create" an invoice record, fill it, confirm it and then to be able to just browse it later and not being able to modify it.

edit: I got it Vaugham, I missed the tab "custom privilege sets" which clearly does what I need, I can set "create" "edit" etc. privileges based on db tables. Thanks!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.