You need to sign in to do that
Don't have an account?
Ken Koellner @ Engageware
Will that get merge in the request? I put the check box on for allow merge references in header in the named cred. I looked at the debug log and it shows "{!$Credential.Username}" but that may be because the debug log doesn't expand the merge reference. I don't have access to the server right now to see if the header arrived.
Named Credential Merge References in Headers Using SOAP Bindings
I'd like to use a merge field from a named credential -- $Credential.Username}.
I'm using a SOAP binding to the setHeader() method doesn't apply.
I'm wondering if the following will work.
myBindingVariable.inputHttpHeaders_x.put('X-USERNAME','{!$Credential.Username}');
Will that get merge in the request? I put the check box on for allow merge references in header in the named cred. I looked at the debug log and it shows "{!$Credential.Username}" but that may be because the debug log doesn't expand the merge reference. I don't have access to the server right now to see if the header arrived.
Check below similar reference that can help you.
https://salesforce.stackexchange.com/questions/200951/namedcredential-soap-request-authentication-headers
Please mark as Best Answer if above information was helpful.
Thanks,