• Sadish
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
How to Validate package from  VS Code?
  • November 20, 2019
  • Like
  • 0
Hey Everyone - I'm trying to pass header info the external API endpoint and using "PageReference" class. I see the documentation (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_System_PageReference_getHeaders.htm) but some reason the header is still not set properly. 

My expectation is the EndPoint URL should be executed without any error screen.

But I'm getting the below error message:
error screen

And here my codeset:
Apex Class: FileDownload
public with sharing class FileDownload {
	public Pagereference doAction() {
        Pagereference newPage = new pagereference('https://<<myDomain>>/api/v1/loanadjudicate/<<externalIdValue>>/file/download');
        newPage.getHeaders().put('Ocp-Apim-Subscription-Key', '<<mySubscriptionKey>>');
        newPage.getHeaders().put('Content-Type', 'text');
        newPage.getHeaders().put('Method', 'GET');
        newPage.setRedirect(false);
        return newPage;
    }
}
VF: DownloadPage
<apex:page controller="FileDownload" action="{!doAction}">

</apex:page>

Any help is appreciated!
 
  • March 18, 2019
  • Like
  • 0

 

Could any tell me where this Partner Tab is available in the Application, i couldn't see it anywhere.

 

https://sadish-developer-edition.my.salesforce.com/sfc/p/90000000HatJWFeJai4cYDv8abymlhoRzWic69E=

 

 

 

 

  • April 23, 2012
  • Like
  • 0

Is it possible to update the currency conversion settings through Apex/API? If yes, which object/metadata should be updated? I am trying to automate the process to update currency conversion settings on daily basis

  • February 03, 2011
  • Like
  • 0