function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sten EbenauSten Ebenau 

Named Credential not working in Winter '16

Hi, 

I have a named credential in my managed package which contains the endpoint to my licensing server. In all previous version this works perfect. 

My pre-release environment and customer sandboxes which are on the Winter '16 release all get an error message now when they use the named credential. 

ERROR : The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "dc3LICENSE" might not exist.

Is there a change in code which i need to make or is this a bug in the winter 16 release?

Thanks,

Sten
 

Best Answer chosen by Sten Ebenau
Sten EbenauSten Ebenau
I did find the issue. Before winter '16 you can use the Named Credential without the package name. From winter '16 you need to include the package name in the named credential. 

BEFORE Winter '16 : 'callout:namedCredential'
AFTER Winter '16 : 'callout:packageName__namedCredential'

Issue fixed, however it is still strange...

All Answers

Sten EbenauSten Ebenau
I already tried to implement the solutions which where suggested in this old thread. https://developer.salesforce.com/forums/?id=906F0000000BIAJIA4
Sten EbenauSten Ebenau
I did find the issue. Before winter '16 you can use the Named Credential without the package name. From winter '16 you need to include the package name in the named credential. 

BEFORE Winter '16 : 'callout:namedCredential'
AFTER Winter '16 : 'callout:packageName__namedCredential'

Issue fixed, however it is still strange...
This was selected as the best answer