How to identify the Security Tasks and Security Roles using the Support Debugging Tool
From the Microsoft Dynamics GP Application Level Security Series.
In the previous post, How to identify the Security Tasks and Security Roles associated with a specific window or report we used the syCurrentResources (SY09400) table to help us identify resources.
We can also use the Resource Information feature of the Support Debugging Tool for Microsoft Dynamics GP to translate a form's Display Name to a Dictionary ID and Resource ID. As we are also going to use the SQL Execute feature to run our query, we will be using Advanced Mode and so need to log in as a user with administrator permissions.
Below are the steps, please skip steps already completed previously:
- Click here for the links to download the tool from PartnerSource.
- Extract the archive files to your application folder.
- Launch Microsoft Dynamics GP and select Yes to include new code.
- Log into Microsoft Dynamics GP as 'sa' or a user with administrator permissions.
- From the menus click Microsoft Dynamics GP, click Tools, click Support Debugging Tool.
- From the Support Debugging Tool window, click Options, click Dex.ini Settings.
- On the Debug Tab, in the Support Debugging Tool Options section, select the Enable Debugger Advanced Mode Features checkbox. If a System Password is in use, you will need to enter it.
- Click OK to close the Dex.ini Settings window.
- From the Support Debugging Tool window, click Options, click Resource Information.
- On Resource Information window enter the Display Name and the first form which has that name will be displayed.
- Make a note of the Product ID and Resource ID values.
- From the Support Debugging Tool window, click Options, click SQL Execute. If a System Password is in use, you will need to enter it.
- Copy the following query into the script window, update the Product ID and Resource ID and click Execute. Screenshot below:
SQL Query
SELECT ISNULL(A.SECURITYROLEID,'') AS SECURITYROLEID, ISNULL(M.SECURITYROLENAME,'') AS SECURITYROLENAME, --ISNULL(M.SECURITYROLEDESC,'') AS SECURITYROLEDESC,
ISNULL(O.SECURITYTASKID,'') AS SECURITYTASKID, ISNULL(T.SECURITYTASKNAME,'') AS SECURITYTASKNAME, --ISNULL(T.SECURITYTASKDESC,'') AS SECURITYTASKDESC,
O.DICTID, O.SECRESTYPE, O.SECURITYID
FROM DYNAMICS.dbo.SY10700 O
FULL JOIN DYNAMICS.dbo.SY09000 T ON T.SECURITYTASKID = O.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY10600 A ON A.SECURITYTASKID = T.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY09100 M ON M.SECURITYROLEID = A.SECURITYROLEID
WHERE O.DICTID = <Product_ID> AND O.SECURITYID = <Resource_ID> AND O.SECRESTYPE = 2Note: The <Product_ID> and <Resource_ID> placeholders represent the Product ID and Resource ID from the Resource Information window. For example, "Sales Transaction Entry" is Product ID = 0, Resource ID = 619.
Below are the example results based on a default installation for 'Sales Transaction Entry':Result Set
SECURITYROLEID SECURITYROLENAME SECURITYTASKID SECURITYTASKNAME DICTID SECRESTYPE SECURITYID
----------------------- ------------------------------- ----------------------- ----------------------- ------- --------------- ----------
BOOKKEEPER* Bookkeeper TRX_SALES_001* Enter SOP transactions 0 2 619
CUSTOMER SERVICE REP* Customer Service Representative TRX_SALES_001* Enter SOP transactions 0 2 619
OPERATIONS MANAGER* Operations Manager TRX_SALES_001* Enter SOP transactions 0 2 619
SHIPPING AND RECEIVING* Shipping and Receiving TRX_SALES_001* Enter SOP transactions 0 2 619If there are no Security Roles assigned to the Security Tasks, they will show as blank. If there are no Security Tasks assigned to the Operation, they will also show as blank.
To speed up the process, a settings file with the SQL Execute Query saved has has been attached to the bottom of this post which can be loaded using the Configuration Export/Import window.
David
Posted: Friday, November 14, 2008 11:30 AM by David Musgrave
Filed under: Security, Support Debugging Tool, Application
Attachment(s): Debugger Settings.dbg.zip
No comments:
Post a Comment