Hi,
Depending on the user I make the contact card editable or non-editable.
The user with the non-editable contact card is however allowed to insert new records. When the complete form is non-editable it is not possible to insert a new record.
Who can help me with this problem?
0
Comments
IF Whatever() THEN BEGIN
MESSAGE('Nope');
EXIT(FALSE);
END;
The user-setup table should get a new field (boolean). Let call this field "Contact Modify Permission".
Now make a function in the contact form called something like "SetFormEditableProperty"
IF UserSetup."User ID" <> UserID THEN
IF NOT UserSetup.GET(UserID) THEN
UserSetup."Contact Modify Permission" := false;
CurrForm.EDITABLE := UserSetup."Contact Modify Permission";
Call this function from the onopenform en on aftergetcurrentrecord triggers.
* Code as not been tested.
Good luck!
If it was hard to write, it should be hard to understand."