CALCFIELDS and permissions

MauddibMauddib Member Posts: 269
I have a form who's soure is set to the Item Table. The Form does not write to any tables, merely reads from them.

However any user with no write permissions to the Item table cannot use this form.

Any idea why? The form DOES have fields which when validated calls:

CALCFIELDS(inventory)

to calculate the inventory field. Does the CALCFIELDS function require write permission to the Item table? Obviously the solution then is to give the form the required permission, however Im curious why this would be so.

Comments

  • DenSterDenSter Member Posts: 8,307
    Forms generally don't need CALCFIELDS commands. This command is used in C/AL code to calculate the value of a flowfield. Flowfields are automatically calculated by the form object, so it appears this is a redundant command.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Just make a simple form with only the item no. and description and see if this causes problems.
  • MauddibMauddib Member Posts: 269
    So where else could I look on a form for why it might be attempting to update the item table? Ive used the developers toolkit to few all the C/AL on the form and nowhere is it updating, modifying or changing information in that table.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can check via the client monitor.
  • MauddibMauddib Member Posts: 269
    Sorry all, solved this problem, it was a design flaw by the origional coder of the form. For the sake of anyone reading this thread in the future with a similar problem::::

    When designing a form that is for reporting only the first thing you should do is set InsertAllowed, ModifyAllowed and DeleteAllowed to NO everytime. The designer of this form didnt.

    What was happening was that my users were filtering the form and acheived a position where the form had no results left (no item matched their filters). So when they tried to change a filter the form tried to insert a new record and was not allowed as the user didnt have permission to the item table.

    Thanks for your time Mark. You seem to reply to every question i ever post on here :)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Mauddib wrote:
    What was happening was that my users were filtering the form and acheived a position where the form had no results left (no item matched their filters). So when they tried to change a filter the form tried to insert a new record and was not allowed as the user didnt have permission to the item table.

    This is solved in 4.0 in many forms by changing the findrecord trigger.
Sign In or Register to comment.