From time to time you may wish to stop an individual or group of users the ability to add / update or delete records in Ostendo, whilst still giving them access to specific functions within Ostendo.
In this example we will prevent a user 'GENERAL' from adding / updating and deleting Items from the Items screen.
1) Create a Screen Data Script called in this case 'No Update on ItemMaster'
2) Copy this code into this script:
begin
if (currentuser = 'GENERAL') then
begin
showmessage('You cannot update data from this screen');
abort;
end;
end.
3) Go to File->Scripting Configuration->Screen Data Scripts and specify the following entries:
- Screen = Items
- Table Name = ITEMMASTER
- SQL Type = Insert
- Script Name = No Update on ItemMaster
Repeat this for SQL Types Update and Delete.
4 ) Log out of Ostendo and log in as the GENERAL user name. Now if you attempt to change anything on the Items screen you will receive a message preventing you from saving the record.