web
You’re offline. This is a read only version of the page.
close
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:
I have the same question (0)
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    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.

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans