Skip to main content

Resolving validation errors - "NoDataFoundException / check_access_nc error deploying Agentforce metadata"

Troubleshooting a Salesforce metadata API error blocking Agentforce (GenAI/AI) metadata deployments

Written by Chris Mead

Symptom

Deploying Agentforce (GenAI/AI) metadata fails with a fatal error referencing system.security.NoDataFoundException and check_access_nc.

In Gearset, this might look like this:

An example of the full error message in plain text

There has been a problem validating your changes. The error message returned was: system.security.NoDataFoundException: ERROR: Raising ValidationException.No_Data_Available at MetaAccess.sql(18acacd): check_access_nc: 762 [SDB:: APP001] Where: PL/sdb function

grumpy.cmetaaccess.check_access_nc(character varying, grumpy.userinfo.grumpy.btsettingsinfo, character varying, boolean, character varying, integer, boolean, boolean, character varying, character varying) line 214 (SFSQL 762) at RAISE PL/sdb function grumpy.cmetaaccess.check_access(character varying, character varying, integer) line 17 (SFSQL 938) at RETURN PL/sdb function

grumpy.cmetaaccess.check_access_setup_bpo(character varying, grumpy.id_array, integer, character varying) line 60 (SFSQL 1145) at assignment PL/sdb function

grumpy.ctlsetupentitydatatemplate.bulk_get_detail(grumpy.id_array, integer, character varying, character varying) line 37 (SFSQL. 115) at assignment PL/sdb function

grumpy.ctlsetupentitydatatemplate.get_tlsetupentdata(character varying, character varying) line 8 (SFSQL 132) at assignment (call cTlSetupEntityDataTemplate.get_tlsetupentdata(?,?,?)}

(call cTlSetupEntityDataTemplate.get_tlsetupentdata(?,?,7)) SQLState: 50001 Where: PL/sdb function grumpy.cmetaaccess.check_access_nc(character varying, grumpy.userinfo.grumpy.btsettingsinfo, character varying, boolean, character varying, integer, boolean, boolean, character varying,

Cause

This is a known Salesforce issue when attempting to deploy Agentforce Agents that were built using the new Agentforce Builder.

Salesforce have documentation on this issue here:

https://help.salesforce.com/s/issue?id=a02Ka00000mH27WIAS&title=undefined

Workaround

Salesforce has a workaround on their help site here.

However, this can also be resolved using Gearset and a slight manual workaround.

  • In the target org, use the new agent builder to create a new agent

  • Retry your deployment in Gearset, validation should now succeed

  • Optionally, delete the agent that was created in the target org in the first step

We're still working on the exact steps for working around this in Gearset. If this doesn't work for you, please do get in touch via our in-app chat.

Did this answer your question?