Hello!
Does anyone know when the amautogrant sproc gets created or where it's used? Our auditors are asking about it. Thanks!
Marisol
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156