Error:

You receive the following error while attempting to activate Security Manager in Dynamics GP Toolbox.

A get/change first operation on table 'sySecurityAssignTaskOperations' (45).

[Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'S'.

[Microsoft][SQL Server Native Client 10.0][SQL Server]Unclosed quotation mark after the character string ') ORDER BY SECURITYTASKID ASC ,DICTID ASC ,SECURITYID ASC ,SECRESTYPE ASC '.

Cause:

This error occurs when a Microsoft Dynamics GP Security Task ID contains an apostrophe. There may be multiple Task ID’s with an apostrophe.

Resolution:

  1. Run the following statement against the Dynamics database in SQL Management Studio to find any Task ID’s that contain an apostrophe:
    SELECT * FROM SY09000 WHERE SECURITYTASKID LIKE '%''%'
  2. Create a new Task to replace the Task with the apostrophe.
    1. Log into GP as the sa user.
    2. Click Microsoft Dynamics GP | Tools | Setup | System | Security Tasks.
    3. Select the Task ID with the apostrophe and click Print.  This will generate a report that contains all the items in this task.
    4. Save this report to reference when creating the new Task ID without an apostrophe.
    5. Click Clear to clear the window, then give the new Task an ID without an apostrophe, a Task Name, and a Category.
    6. Select the appropriate Product, Type, Series, and User Type to display the Items in the Access List.
    7. Mark the items that were included on the Task you are re-creating from the report generated in step c above.
    8. You may need to change the Type to allow you to select all the items for this Task.
    9. Once completed, click Save.
    10. Repeat these steps for all Tasks that need to be re-created without apostrophes in the Task ID.
  3. Run the following statement against the Dynamics database in SQL Management Studio to find all the Roles that contain the Tasks with apostrophes:
    SELECT * FROM SY10600 WHERE SECURITYTASKID LIKE '%''%'
  4. Edit the Roles to add the new Tasks and remove the old Tasks with the apostrophes.
    1. Log into GP as the sa user.
    2. Click Microsoft Dynamics GP | Tools | Setup | System | Security Roles to open the Security Role Setup window.
    3. Select the Role that was identified in the results of the script.
    4. Find the new Task ID without the apostrophe, and mark it.
    5. Find the Task ID with the apostrophe and unmark it.
    6. Click Save.
    7. Repeat this for all Roles that have Tasks with apostrophes in the Task ID.
  5. Delete the Tasks ID’s with the apostrophes.
    1. Click Microsoft Dynamics GP | Tools | Setup | System | Security Tasks.
    2. Select the Task ID with the apostrophe and click Delete.
  6. Re-enable Security Manager in Dynamics GP Toolbox.
    1. Click Microsoft Dynamics GP | Tools | Setup | Dynamics GP Toolbox | System Settings.
    2. Double-click Security Manager.
    3. Check the ‘Enable Security Manager’ checkbox.
    4. Click OK to the warning message that states:  ‘Resources will now be built for the Security Manager tool.  This may take several minutes.’
    5. If you receive the message:  ‘Roles recalculation was not completed the last time it was attempted.  Do you wish to continue from that point or start over?’, click Start Over.
    6. Allow the process to complete.

Send this to a friend