Calcfield + Modify Permissions

ReinhardReinhard Member Posts: 249
Hello Mibuso!

Here's the scenario: on the employee card, we have added the picture of the employee. Now, when I try to create a user with only READ permissions on the employee table, and I try to go to the next record, I get an error saying that I don't have permission to modify the record.

Once I delete the picture box off of the form, I don't get this error any more.

Nav 4.0.

Can someone help me resolve this or maybe offer some insight?

Comments

  • matttraxmatttrax Member Posts: 2,309
    You could try giving indirect permission to modify the table. I'm not sure why it would need it, though. Definitely no code behind the picture box?
  • ReinhardReinhard Member Posts: 249
    I tried giving indirect permission.

    Definitely no code. The same thing happens when I try to use the default Employee > Picture functionality.
  • ReinhardReinhard Member Posts: 249
    This is what I think is happening:
    after you get the record, the Picture BLOB field is Calculated. after the record is retrieved, this field is initially empty. now when I go to the next record, it sees Rec does not match xRec and tries to save the record.

    Our solution is, to set autoCalcField to No for the picture box.
    then, after get record:
    IF Rec.WRITEPERMISSION THEN
      CALCFIELDS(Picture);
    

    So the user won't get to see the picture, but at least can see the rest of the information in the employee record.
Sign In or Register to comment.