April 27, 201411 yr 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
April 27, 201411 yr 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
April 28, 201411 yr 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?
April 28, 201411 yr Author 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.
April 28, 201411 yr 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.
April 28, 201411 yr Author 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
Create an account or sign in to comment