Determining Role Access To Extender Objects

Patrick Roth - Click for blog homepageAn Extender case came up recently where the customer was having security issues with Extender forms.

To solve the issue, we needed to determine which Security Roles have access to particular Extender forms.

Note: This method uses the DYNAMICS.dbo.EXT00001 table which was added for version 10.0 Service Pack 4 and later.

We were able to resolve the issue by running a few SQL queries that were consolidated into one query as shown below.  I was able to, ahem, leverage David Musgrave's SQL Security script here to get started.

SQL Query

 SELECT  ISNULL(A.SECURITYROLEID,'') AS SECURITYROLEID, ISNULL(M.SECURITYROLENAME,'') AS SECURITYROLENAME, 
 ISNULL(O.SECURITYTASKID,'') AS SECURITYTASKID, ISNULL(T.SECURITYTASKNAME,'') AS SECURITYTASKNAME ,ISNULL(T.SECURITYTASKDESC,'') AS SECURITYTASKDESC 

from DYNAMICS.dbo.SY10700 O

left outer join DYNAMICS.dbo.EXT00001 EXT ON EXT.Extender_Resource_Number = O.SECURITYID
left outer JOIN DYNAMICS.dbo.SY09000 T ON T.SECURITYTASKID = O.SECURITYTASKID
left outer JOIN DYNAMICS.dbo.SY10600 A ON A.SECURITYTASKID = T.SECURITYTASKID
left outer JOIN DYNAMICS.dbo.SY09100 M ON M.SECURITYROLEID = A.SECURITYROLEID

where   O.SECRESTYPE = 3107 and
 O.DICTID = 3107 and 
    EXT.CMPANYID = -1 and   --need to set the company
   EXT.Extender_ID = 'BRACKET' --and need to set the extender name of the window

To check access, set the EXT.CMPANYID to the Company ID that you want to check access for.  Change the EXT.Extender_ID to the ID of the Extender object.

Result Set

 SECURITYROLEID            SECURITYROLENAME                                    SECURITYTASKID            SECURITYTASKNAME                                    SECURITYTASKDESC
------------------------- --------------------------------------------------- ------------------------- ------------------------------------------------------------------------
AR CLERK*                 Account Receivables Clerk                           EXTENDER                  extender windows                                    all extender windows                                                                                                                                                                                                                                           

The results above show that the only role that can access to this Extender form named "BRACKET" is the AR CLERK* role in the selected company.  Any user in the POWERUSER role would also have access to the form as well.

Hope this helps out,

Patrick Roth
Microsoft Dynamics GP Developer Support

23-Nov-2010: Add note about compatible versions.