An External user belongs to a Company, ps_Cust.
A user can log in and create a new Order.
Each order has ob_Cust.
User has a button "New Order".
Script: CREATE NEW Order WITH Order.ob_Cust = LIRU.ps_Cust
This works fine.
But the NEW_Order FORM has the ob_Cust combo box on it (to show the customer name) - Because an Internal user can use this same screen to create Orders - and that person would need to use the Combo Box to select the Customer for the Order. But you don't want the External User to change who the order is pointing to - cause he can only create Orders for his company.
Enter PROTECT Order.ps_Cust FROM ALL EXCEPT SYSTEM AND Administrator
This appears to work VISUALLY, but behind the scenes it does not store the data correctly.
Basically, fields that are PROTECTed will not get saved to the db correctly.
1) the LOG shows the correct instance getting assigned in the CREATE NEW Agenda item
2) The entry screen shows the ob_Cust Combo box set correctly,
3) No logging, Tomcat or Server messages indicate that those values should not be saved, YET the SQL table shows the truth.
The ob_Cust field will be null. (REN & RID).
Enen a non-reference field that gets set in the CREATE NEW line will show on the screen but NOT get saved.
Is there a workaround - well, yes, but I don't find it acceptable:
1) Make a diff form for internal and external user. For this user above, use HTML box to show the field
1b) Thats bad, because HTML fields require you have columns - and messing with columns takes more time to design and mess with. Less of an issue if you already have columns, but its a hassle when your form needs a column just cause you want to have a button over on the right after a field.
1c) And a 2nd form is unnecessary redundancy for the project when READ PROTECT should be the solution (unless I don't know what RP is for)
2) While you can't conditionally hide a field on a form without READ PROTECT, you can hide a Seperator/Group. So if these fields (I have several) were lucky enough to be all nicely grouped horizontally on a form, then sure, I could put them in a group and hide as a whole. But they're not.
I would think most people would say "just make a 2nd form and use HTML to show these fields" and move on... but I hate redundant forms just for minor visual tweaks.