• AlejandroRaigon
  • NEWBIE
  • 30 Points
  • Member since 2010
  • Success Agent Senior Principal (Tier 3)

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    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!
I have discovered a bug in the Spring 14 release in my sand box.

In the apex class used as the controller for the VF page I set a public Boolean variable called rightNow.

In the Visualforce page I have a command button <apex:commandButton value="Do It" action="{!doit}" immediate="{!NOT(rightNow)}" />. This has been working for several releases.

Click this button in Spring 14 generates an immediate system error.

If I do not use the "NOT" function it works fine.

This works - <apex:commandButton value="Do It" action="{!doit}" immediate="{!rightNow}" />

Adding another global variable notRightNow works as well

This works - <apex:commandButton value="Do It" action="{!doit}" immediate="{!notRightNow}" />

Please get this fixed.


I feel like I periodically run into this issue and feel quite certain that this is a bug. Maybe someone can help.

 

In my controller, I have a Map that looks like this...

 

Map<String, List<CustomObjectWrapper>> objMap;

 My key is a category field for my Custom Object wrapper which looks like this...

 

public class CustomObjectWrapper {
  public boolean selected {get; set;}
  public Custom_Object__c customObject {get; set;}
}

 

 What I am doing in my Visualforce page is create a pageBlockTable for each of the keys (my category) in the map. The values are put into a table and the Description__c field is available for editing. Here is an example.

 

<apex:repeat value="{!objMap}" var="category" >
  <apex:pageBlock title="Category: {!category}">
    <apex:pageBlockTable value="{!objMap[category]}" var="obj">
      <apex:column value="{!obj.customObject.Name}" />
      <apex:column value="{!obj.customObject.Category__c}" />
      <apex:column headerValue="Description">
        <apex:inputField value="{!obj.Description__c}"/>
      </apex:column>
    </apex:pageBlockTable>
  </apex:pageBlock>
</apex:repeat>

 

Now here is the weird part...

 

I have save button on the page that simply updates the records. 99% of the time the records update with no problem. However, when there are two keys in the map of category "VOE" and "Reference", the controller misplaces the values for the Description__c field. The descriptions get saved on the incorrect records. Anything other than the combination of those two keys works fine! Completely bizarre.

 

I've read a bit about some dynamic VF issues with Maps but I don't see anythin definitive in the "Known Issues" list on the community site. Does anyone know if this is indeed a bug? And if so, are there any workarounds?

Hi

 

I tried to make the visualforce page renderas PDF in landscape with following styles

 

<style >
    @page {
        size:landscape;
   }
 </style>
 

 

But it is not working now. Is anybody face the same issue? or have any idea to render the PDF as landscape??

 

Thanks!

  • August 18, 2009
  • Like
  • 0