Field Permission 3.10

SeaMasterSeaMaster Member Posts: 5
edited 2004-12-20 in Navision Attain
Hi, I have a problem.
My customer want's to have a insert/modify permission for a field in a specific table.
So I created a new table called "Field Permission", that look's like this:

Enabled Field No. Field Name Data Type Length Description
Da 10 Table ID Integer
Da 20 Field ID Integer
Da 30 User ID Code 20 Enabled Field

First table in the list is "Item".
So I inserted the record "27", "9", "SA" in the "Field Permission" table.
Then I went to modify the "Item" table code.
OnModify trigger in "Item" table looks like this:

FieldPermission.RESET;
FieldPermission.SETRANGE ("Table ID", 27);
FieldPermission.SETRANGE ("User ID", USERID);
IF FieldPermission.FIND ('-') THEN
REPEAT
..... this is the problem
..... I don't know how to
..... check the diference
..... between the old and
..... the new value of filed
..... specified in the FieldPermission table
UNTIL FieldPermission.NEXT = 0;

The Navision is 3.10
Thank's in advance.

Comments

  • RobertMoRobertMo Member Posts: 484
    IF Rec.Myfield <> xRec.MyField THEN BEGIN
      // field has been changed
    END ELSE BEGIN
      // field has not been changed
    END;
    

    check the help about xrec and rec. Also help for OnModify trigger
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Sign In or Register to comment.