Granting SQL access privileges

Once a SQL table and its auto-generated stored procedures have been created, you must grant privileges to them so they can be accessed by other users. The DYNGRP group, which is set up during the Microsoft Dynamics GP installation, indicates which users have access. All tables and auto-generated stored procedures you create should grant privileges to this group.

To grant access privileges to the DYNGRP group, you will call a special function in the Dynamics.dic dictionary. The GrantAccess() function is part of the SQL Maintenance form in Dynamics.dic. The function can grant access to the table and also to the auto-generated stored procedures for the table. The following example shows how this function could be used to grant access to the IG_Leads_MSTR table and its auto-generated stored procedures.

local boolean result;

{Grant access to the table}
result = GrantAccess(physicalname(table IG_Leads_MSTR), false, "DYNGRP", 'Intercompany ID' of globals) of form 'SQL Maintenance';

{Grant access to the table auto-generated procedures}
result = GrantAccess(physicalname(table IG_Leads_MSTR), true, "DYNGRP", 'Intercompany ID' of globals) of form 'SQL Maintenance';

Documentation Feedback