Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

amautogrant Stored Procedure

(1) ShareShare
ReportReport
Posted on by 67

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
    11,006 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
    13,982 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,961 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,801 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans