Connect rest api in Apex does not automatically enabled named credentials when created #568
Open
1 task done
Labels
bug
Something isn't working
Summary
When creating a Named Credential using the Salesforce Connect API via Apex, the "Enabled for Callouts" setting is not automatically toggled on. However, when the same Named Credential is created via Postman using the same Connect API, the "Enabled for Callouts" setting is automatically toggled on.
Salesforce Org Type
Sandbox
Steps To Reproduce
Configuration:
Write an Apex class to create a Named Credential using the Connect API.
Set up the Named Credential with the required details, including URL, External Credentials, and Callout Options.
Deploy the Apex code to the Scratch Org.
Run: Execute the Apex code to create the Named Credential.
Current Behavior
The Named Credential is created successfully, but the "Enabled for Callouts" toggle is not automatically enabled, requiring manual intervention to enable it. This behavior is inconsistent with creating Named Credentials via Postman using the same Connect API, where the toggle is automatically enabled.
Expected Behavior
The "Enabled for Callouts" setting should be automatically toggled on when the Named Credential is created using the Connect API via Apex, just as it is when created via Postman.
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: