Insert record in non-editable form

RemcoRemco Member Posts: 81
edited 2003-10-02 in Navision Attain
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?

Comments

  • LG_HellströmLG_Hellström Member Posts: 13
    OnInsertRecord(BelowxRec : Boolean) : Boolean
    IF Whatever() THEN BEGIN
    MESSAGE('Nope');
    EXIT(FALSE);
    END;
    Did I commit today?
  • eromeineromein Member Posts: 589
    I think you should do something like this:


    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!
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
Sign In or Register to comment.