Skip to main content

#Trailhead Challenges1,640 discussing

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies. ** NOTE ** : If you were able to get a response that solved your issue, please mark it as the 'Best Answer' to help other Trailblazers. If the issue persists after 48 hours, create a Trailhead Help case at https://help.salesforce.com/s/support for further assistance.

Hello, i am performing an salesforce to salesforce integration between two orgs, namely target and source orgs.

But when i create a rest endpoint class in target and a request class in source org, then once i run it i am receiving this error:

 

"Apex script unhandled exception by user/organization: 005gK0000068gUr/00DgK000008kSkh 

 

Organization: A2Z (

orgfarm-***-dev-ed.develop.my.salesforce.com

). 

 

Failed to invoke future method 'public static void getdetails()' on class 'salesforcesourceorg' for job id '707gK00000G7TZh' 

 

caused by: System.CalloutException: We couldn't access the credential(s). You might not have the required permissions, or the external credential "TargetOrg_EC" might not exist. 

 

Class.salesforcesourceorg.getdetails: line 10, column 1" 

 

Note: 

I have performed following steps: 

 

Created a external client app in target org. 

Created auth. provider in source org with consumer key and secret key. 

Updated the callback url in target org. 

Created external credential in source org >> Authorised using target org username and password. 

Created named credential selecting newly created external credential. 

Created new dummy account in target org. 

Created new apex class in target org for Get request. 

Created new apex class in source org for fetching the accounts in target org. 

And then got the previously mentioned error. 

 

Unsuccessfull Steps which i already performed to cater this issue: 

Checked the callback url. 

Confimed that i have system admin access in both org. 

 

I have also shared the screenshots. 

If anyone knows how to solve this issue, please do let me know. 

Thanks in advance.

 

 

 

#Trailhead Challenges

2 answers
  1. Sushil Kumar (UKG) Forum Ambassador
    Oct 26, 2025, 2:23 AM
    Your profile need to have access to external credentials.
0/9000