• MarkDenford
  • NEWBIE
  • 15 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 4
    Replies
I’m developing an Apex callout using a continuation with the HttpRequest class. I’ve defined the Named Credential and turned off the “Generate Authorization Header” setting in the definition of the Named Credential. If I do the callout synchronously Salesforce doesn’t generate or include any Athorization header (as expected) and all is well. However if I do the callout using a Continuation Salesforce ignores this setting and still sends an Authorizarion header. This is causing 401 errors on my endpoint, I set the auth in a custom header, which is why I don’t want salesforce to generate that header. 

Has anyone faced or overcome this, or know why salesforce is ignoring this setting?
I’m developing an Apex callout using a continuation with the HttpRequest class. I’ve defined the Named Credential and turned off the “Generate Authorization Header” setting in the definition of the Named Credential. If I do the callout synchronously Salesforce doesn’t generate or include any Athorization header (as expected) and all is well. However if I do the callout using a Continuation Salesforce ignores this setting and still sends an Authorizarion header. This is causing 401 errors on my endpoint, I set the auth in a custom header, which is why I don’t want salesforce to generate that header. 

Has anyone faced or overcome this, or know why salesforce is ignoring this setting?
I am working on the Visual Studio Code IDE with Salesforce DX. 

1. Successfully created a package sfdx force:source:convert --outputdir mdapi_output_dir --packagename managed_pkg_name

2. Now I am trying to deploy in the needed ORG with this command
sfdx force:mdapi:deploy --deploydir mdapi_output_dir --targetusername me@example.com

getting the below errors

Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a NetworkBranding component. remove 
components of NetworkBranding type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a Network component. Remove
components of Network type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a SiteDotCom component. Remove
components of SiteDotCom type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a CustomSite component. Remove
components of CustomSite type from the package.


But I want to deploy my package along with NetworkBranding, Network,  SiteDotCom, and CustomSite.

Your help would be really appreciated.
 
 
I am working on the Visual Studio Code IDE with Salesforce DX. 

1. Successfully created a package sfdx force:source:convert --outputdir mdapi_output_dir --packagename managed_pkg_name

2. Now I am trying to deploy in the needed ORG with this command
sfdx force:mdapi:deploy --deploydir mdapi_output_dir --targetusername me@example.com

getting the below errors

Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a NetworkBranding component. remove 
components of NetworkBranding type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a Network component. Remove
components of Network type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a SiteDotCom component. Remove
components of SiteDotCom type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a CustomSite component. Remove
components of CustomSite type from the package.


But I want to deploy my package along with NetworkBranding, Network,  SiteDotCom, and CustomSite.

Your help would be really appreciated.