Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4551 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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

Posted

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.

Posted

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!

This topic is 4551 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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