Jump to content

Allow editing of a limited number of fields after commit


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

Recommended Posts

Hi All,

I want to stop editing of all but two field in a record after it has been committed (Via script). At the moment I just create a value in a non visible field called Commit and if that value is present then editing is not allowed but I am unable to find a way in Custom Record Privileges to then allow editing of two field that can change. Any help would be appreciated

Link to comment
Share on other sites

Perhaps the easiest way to do this is to make the two fields read-only in the Privilege Set's field level access settings.  Then run a script set to run with Full Access Privileges that pops up the custom dialog box and allows entry of some data to the fields.  Tag this script to the field with an OnEnter trigger.  That should do the trick.

 

 

 

At the moment I just create a value in a non visible field called Commit

 

Be careful with this.  Just because the field isn't visible doesn't mean it can't be changed.  You need to protect this field.

 

Steven

Link to comment
Share on other sites

I want to stop editing of all but two field in a record after it has been committed (Via script).

 

Can you explain this part in more detail? Committing a record is not a one-time event; a record needs to be committed every time it has been edited, so the request is not quite clear. Perhaps you mean after first commit (at creation)?

 

The script part, too, is puzzling. Is the record created entirely by a script - or do users need to enter data into fields that you want to lock afterwards?

Link to comment
Share on other sites

Then run a script set to run with Full Access Privileges that pops up the custom dialog box and allows entry of some data to the fields.  Tag this script to the field with an OnEnter trigger.  That should do the trick.

 

 

Be careful with this.  Just because the field isn't visible doesn't mean it can't be changed.  You need to protect this field.

 

Steven

Hi Steven,both of the fields are drop down menus to try and eliminate finger problems. I don't know how I can get that to work. The non visible field is not on any layout and only a full access account is able to enter data which is achieved via a script on a button

 

Can you explain this part in more detail? Committing a record is not a one-time event; a record needs to be committed every time it has been edited, so the request is not quite clear. Perhaps you mean after first commit (at creation)?

 

The script part, too, is puzzling. Is the record created entirely by a script - or do users need to enter data into fields that you want to lock afterwards?

Hi Comment,the record is a goods received record and all the normal the data is entered along with the location that the received parts are stored. When the record has been completed and a storage location for the part has been determined a scripted button with full access privileges  (Commit) is selected and a value is entered into a field that is only accessible through an admin account. When that field is populated the record becomes non editable with Custom Record Privileges. The point of all this is to stop someone changing the quantity of goods received. The two fields however are Location (where the goods are stored), and Condition. Location has ten possible storage locations plus eight technicians (and of course installed) who may be carrying the part and this changes as does the condition of the part, new, repaired or defective.

Link to comment
Share on other sites

A relatively simple solution would be to put the two fields in another table, with a one-to-one relationships with the current table.

 

 

When the record has been completed and a storage location for the part has been determined a scripted button with full access privileges  (Commit) is selected and a value is entered into a field that is only accessible through an admin account.

 

I am still not sure why this is needed. You could either allow users to create records but not edit them (this allows editing of newly created records until the end of the current session - which is convenient in case a mistake has been made in the initial data entry), or allow them to edit records only when:

Get ( RecordOpenState ) = 1

i.e. only before the very first commit of a newly created record.

Link to comment
Share on other sites

Hi comment, in effect my commit button is exactly what  Get ( RecordOpenState ) = 1  is. The reason why the storeman needs to modify it is that when a technician goes to perform an installation where 16 cameras are required, they may take 19 cameras of various types from stock as the exact set up is not known prior to installation. On the stock record those cameras are then booked to that technician in the Location field. When the technician returns from the installation the additional cameras are then booked back into a storage location

Moving the fields into another table is probably the answer thank you

Link to comment
Share on other sites

This topic is 3623 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.