2 Replies Latest reply on Mar 16, 2009 11:23 AM by CarrieB.

    Permissions issue relating to "delete" capabilities

    CarrieB.

      Title

      Permissions issue relating to "delete" capabilities

      Post

      I have an issue I'm hoping someone can help me out with. =) Let me see if I can explain what I'm doing here. I've set up all my users (other than myself) with limited capabilities, i.e. they can't delete. When the user is in the main record, they click on a button that runs the following script:

      Set Field [Global Field; Contact ID]

      Allow User Abort [Off]

      Select Window [Current Window]

      Move/Resize Window [criteria stuff here]

      Go to Layout [layout here]

      Show All Records

      New Record/Request

      Set Field [Related Field; Global Field]

      Commit Records/Requests

      Adjust Window

       

      Then, while the user is in this layout, they fill in required criteria to the new record that was created and have a few button options at the end. One of the Options is a "Cancel, go back" type of button. I had to set this button to first commit the record, then delete the record (in this related table) before going back to the original layout. When I didn't have the "commit" first, the database would sometime choose to delete the original record in the other table if you chose certain criteria before cancelling. Anyhoo! To get to my current dilema ...... a normal user gets an error message when pressing this button because part of the script "deletes" the related record, which they don't have permission to do. I'd like the scripts to work, regardless of user permissions. Is there a way to do this?

       

      Thanks!!! Hope this made sense. :smileywink:

        • 1. Re: Permissions issue relating to "delete" capabilities
          philmodjunk
            

          Two options come to mind:

           

          Option 1, There's a little check box down at the bottom of your script editor labeled "run script with full access priviledges". If you click that, your script will run and delete files for all uses just as though they had opened the database with a full access password. I believe filemaker added this feature specifically to resolve issues like you describe.

           

          Option 2, This is "Ye olde fashioned way" but it still has uses in some areas. Define global fields for each field for your users to fill in their criteria. To "commit" the data, use a series of set field steps to update the fields in the current record (and yes, you can create new related records this way as well.) If the user chooses to cancel, you don't do anything expect possibly clear the global fields since you haven't yet modified anything but global fields.

           

           

          • 2. Re: Permissions issue relating to "delete" capabilities
            CarrieB.
              

            Duh! I've seen that box a million times. Should have tried that before posting .... I'll go try it now.

             

            Thanks!!