• yarddefender
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I am attempting to use Named Credentials in a method that returns a Continuation, but immediately receive an Internal Server Error when the Continuation method is called. The method that makes the call looks like this:
 
public Object startRequest() {

		// Create continuation with a timeout
		Continuation con = new Continuation(90);
		// Set callback method
		con.continuationMethod = 'processResponse';

		// Create callout request
		HttpRequest req = new HttpRequest();
		req.setMethod('GET');
		req.setEndpoint('callout:Netsuite/getCustomerById?customerId=' + opp.Account.Netsuite_ID__c);

		// Add callout request to continuation
		this.requestLabel = con.addHttpRequest(req);

		// Return the continuation
		return con;
	}

My Named Credential uses Named Principal Identity Type with Password Authentication. I am going to switch to using custom settings if this can't be resolved, but figured I'd check to see if anyone else has experienced something similar.

Thanks!