Skip to main content
Answer

Add Access Rights For Screen timeout

  • June 17, 2025
  • 1 reply
  • 41 views

Forum|alt.badge.img+1

I’m trying to add Access Rights to my Customization Project, but it’s not working!

I click the Add button on the Access Rights page of the Customization Project Editor, key a screen code or click the screen name selector, and … nothing happens. I eventually get a popup:

Localhost says:
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

 

I’ve restarted the IIS App Pool. Rebooted. Republished. No difference.

 

I eventually used SQL Profiler to find the offending SQL query. It’s this one…

SELECT /* AU.20.52.00, 388CE942 */
    MAX( [SiteMap].[NodeID]), /*some field omitted for brevity*/
    [SiteMap].[ScreenID], 
    MAX( [RolesInCacheInProject].[CreatedByScreenID]), MAX( [RolesInCacheInProject].[CreatedDateTime]), MAX( [RolesInMemberInProject].[CompanyID])
FROM [SiteMap] [SiteMap] with (nolock)
LEFT JOIN [RolesInGraph] [RolesInGraphInProject] with (nolock) ON ( [RolesInGraphInProject].[CompanyID] IN ( 1, 2) AND 8 = SUBSTRING( [RolesInGraphInProject].[CompanyMask], 1, 1) & 8) AND [SiteMap].[ScreenID] = [RolesInGraphInProject].[ScreenID] AND [RolesInGraphInProject].[CompanyID] > 1
LEFT JOIN [RolesInCache] [RolesInCacheInProject] with (nolock) ON ( [RolesInCacheInProject].[CompanyID] IN ( 1, 2) AND 8 = SUBSTRING( [RolesInCacheInProject].[CompanyMask], 1, 1) & 8) AND [SiteMap].[ScreenID] = [RolesInCacheInProject].[ScreenID] AND [RolesInCacheInProject].[CompanyID] > 1
LEFT JOIN [RolesInMember] [RolesInMemberInProject] with (nolock) ON ( [RolesInMemberInProject].[CompanyID] IN ( 1, 2) AND 8 = SUBSTRING( [RolesInMemberInProject].[CompanyMask], 1, 1) & 8) AND [SiteMap].[ScreenID] = [RolesInMemberInProject].[ScreenID] AND [RolesInMemberInProject].[CompanyID] > 1
WHERE ( [SiteMap].[CompanyID] IN ( 1, 2) AND 8 = SUBSTRING( [SiteMap].[CompanyMask], 1, 1) & 8) AND ( [SiteMap].[ScreenID] IS NOT NULL  AND [SiteMap].[ScreenID] <> '00000000')
GROUP BY [SiteMap].[ScreenID]
ORDER BY MAX( [SiteMap].[NodeID]) OPTION(OPTIMIZE FOR UNKNOWN)

 

Removing the join to RolesInMember showed it to be the problem. Causing 10s of millions of clustered index seeks into a 1000 row table.

 

I managed to get it to perform quickly by moving some rows out the way, hacking the data using:

update [dbo].[RolesInMember] set CompanyID=-CompanyID where CompanyID>1 and ScreenID='PD100100'

(Where PD100100 happens to be one of my bespoke screens.)

 

So it looks like the data caused the query to misbehave, but I feel there should have been a better solution.

Any suggestions?

Best answer by hkabiri

@allisterchambers48 Yes this is a known issue which happens If a large number of user roles were configured in the system and a user tried to add access rights to a customization project package, the system displayed the following error message: <i>Execution Timeout Expired. The timeout period prior to completion of the operation or the server is not responding.</i>

It is also safe to remove records from RolesInGraph table in which has same screenId, AccessRight and CompanyID as record with Rolename = * as they are somehow redundant.

1 reply

hkabiri
Acumatica Moderator
Forum|alt.badge.img+8
  • Acumatica Support Team
  • Answer
  • September 11, 2025

@allisterchambers48 Yes this is a known issue which happens If a large number of user roles were configured in the system and a user tried to add access rights to a customization project package, the system displayed the following error message: <i>Execution Timeout Expired. The timeout period prior to completion of the operation or the server is not responding.</i>

It is also safe to remove records from RolesInGraph table in which has same screenId, AccessRight and CompanyID as record with Rolename = * as they are somehow redundant.