Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

amautogrant Stored Procedure

Posted on by 65

Hello!

Does anyone know when the amautogrant sproc gets created or where it's used?  Our auditors are asking about it.  Thanks!

Marisol

Categories:
  • Suggested answer
    Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: amautogrant Stored Procedure

    Hi M_Britt,

    Let me give you some more details, so you could answer your auditors questions.

    When Dynamics GP get installed, and companies are setup all the tables are created in database, each table have respective set of stored procedures started with zDP, for each GP table you have associated zDP stored procedures, all these SQL resources are given access to GP users via a DYNGRP database role.

    DYNGRP database role is used to gain access to the objects, such as tables, stored procedures, and views that exist within the database. So when new tables are created to use with Dynamics GP forms for holding additional information these tables and their associated stored procedures are not assigned with DYNGRP access. amautogrant sproc have the same command of granting permission to custom sql object for  SELECT,INSERT,DELETE,UPDATE from DYNGRP which we found in Grant.sql file on default installation path C:\Program Files (x86)\Microsoft Dynamics\GP2018\SQL\Util

    Another way of creating custom table and associated stored procedures is from window SQL Maintenance, This window creates tables, associated stored procedures and also assign them access by calling dexterity script

    GrantAccess() of form SQL Maintenance', 0, "custom table name", 1, "DYNGRP", "company database name".

    but this is a manual process and many customer don't want to do it so developers add code for automatically creating tables and providing them access permissions. One thing which needs to be kept in mind is that code to create amAutoGrant stored procedure is the one given by Microsoft in SDK, it's not developers own code.

    DYNGRP_5F00_almas_5F00_dexterity.png

    createtable_5F00_almas_5F00_dexterity.png

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,917 Most Valuable Professional on at
    RE: amautogrant Stored Procedure

    Hi

    The amautogrant stored procedure is used in some demo Dexterity code for granting access to tables after they are created.

    So it is possible that any Dexterity customizations installed created it.

    It is safe to delete as it will get created again if needed.

    Regards

    David

    PS: As a Dexterity developer, there is a better way of granting access without using the amautogrant sproc method, but this is the example that many new developers use.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans