• 开发商
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
I'm getting intermittent success with an http callout. Code had 100% success last week with 7 callouts. Code completed only 3 times this week. The error returned is always 'System.CalloutException: Empty cookie header string'.

Here is the request:

Http h = new Http();
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
       
req.setHeader('Content-type', 'application/x-www-form-urlencoded');
req.setEndpoint('http://news.google.com/news/search');
req.setBody(queryString);     
req.setMethod('POST');
       
res = h.send(req);

Here is the log when the callout is successful:

10:00:16.102 (102784000)|SYSTEM_METHOD_ENTRY|[57]|System.Http.send(ANY)
10:00:16.102 (102879000)|CALLOUT_REQUEST|[57]|System.HttpRequest[Endpoint=http://news.google.com/news/search, Method=POST]
10:00:16.738 (738211000)|CALLOUT_RESPONSE|[57]|System.HttpResponse[Status=OK, StatusCode=200]

Here is the log when the callout errors:

10:00:15.109 (109922000)|SYSTEM_METHOD_ENTRY|[57]|System.Http.send(ANY)
10:00:15.109 (109997000)|CALLOUT_REQUEST|[57]|System.HttpRequest[Endpoint=http://news.google.com/news/search, Method=POST]
10:00:15.396 (396635000)|EXCEPTION_THROWN|[57]|System.CalloutException: Empty cookie header string
10:00:15.396 (396743000)|SYSTEM_METHOD_EXIT|[57]|System.Http.send(ANY)

Anyone run ito this before? Any ideas?
I'm looking for a way to link out of the salesforce1 app and open the device browser. Somthing similar to openURLmethod of UIApplication. I have tried <a href and window.open and each behave differently inside salesforce1. The link will originate on a VF page. Any ideas?

I have 1 account with 10 contacts. I want to list contacts with a last name starting with A-M on tab 1 and N-Z on tab 2.

 

I currently have 2 get methods in my controller to make this work. Is there anyway to reduce the controller code to 1 method or will each tab require its own get method?

 

 

 

I am just starting VisualForce and have lost my way with inputField. I have a custom object searchDetail__c with a lookup field named User2__c. I want to lookup the user using inputField, press a button, and have the name written back to the screen. I have no interest in saving the record.
 
My page:
 
Code:
<apex:page renderAs="html" standardController="searchDetail__c" extensions="extSearchDetail">
<apex:form >
  <apex:pageBlock mode="edit" id="block" title="">
    <apex:pageBlockSection >
    <apex:pageBlockSectionItem >
      <apex:panelBar >
        <apex:panelBarItem label="Search">
          <apex:panelGroup >
          <apex:inputField id="u" value="{!searchDetail__c.User2__c}"/><BR/>
          <apex:commandButton value="Go!" action="{!doSearch}" rerender="out" status="status"/>
          </apex:panelGroup>
        </apex:panelBarItem>
      </apex:panelBar>
      <apex:panelBar >
        <apex:panelBarItem label="name">
          <apex:panelGroup id="out">
          hello: {!Value}
          </apex:panelGroup>
        </apex:panelBarItem>
      </apex:panelBar>
    </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>
</apex:page>

 My controller:
 
Code:
public class extSearchDetail {
    public extSearchDetail(ApexPages.StandardController controller) { }

    public PageReference doSearch() {
      // please help
    }

    public String getValue() {
      // please help
    }
}

 I am not sure how to code the controller so I can reference the inputField, query the User table, and return the name.
 
Any help is appreciated.
 


 
I have a "full page width" web tab with content generated by an HTML Scontrol. When the content exceeds a certain length a vertical scroll bar appears. It appears that the web tab container is where the overflow occurrs.
 
I would like to eliminate the nested scroll bar. How do I do this?
 
The company standard browser is IE.
 
Thanks in advance.

I noticed when adding visualforce to Salesforce1 in either the page layout, mobile card or publisher action, any interaction on the page causes it to reload in it's own frame before allowing the interaction.

 

For example, a page with a link, the link will be rendered, but attempting to click it or anywhere else on the embedded page causes the visualforce page to load full screen, then I'm able to tap it and navigate.

 

Is that behaviour intended, or is there a workaround?

I am just starting VisualForce and have lost my way with inputField. I have a custom object searchDetail__c with a lookup field named User2__c. I want to lookup the user using inputField, press a button, and have the name written back to the screen. I have no interest in saving the record.
 
My page:
 
Code:
<apex:page renderAs="html" standardController="searchDetail__c" extensions="extSearchDetail">
<apex:form >
  <apex:pageBlock mode="edit" id="block" title="">
    <apex:pageBlockSection >
    <apex:pageBlockSectionItem >
      <apex:panelBar >
        <apex:panelBarItem label="Search">
          <apex:panelGroup >
          <apex:inputField id="u" value="{!searchDetail__c.User2__c}"/><BR/>
          <apex:commandButton value="Go!" action="{!doSearch}" rerender="out" status="status"/>
          </apex:panelGroup>
        </apex:panelBarItem>
      </apex:panelBar>
      <apex:panelBar >
        <apex:panelBarItem label="name">
          <apex:panelGroup id="out">
          hello: {!Value}
          </apex:panelGroup>
        </apex:panelBarItem>
      </apex:panelBar>
    </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>
</apex:page>

 My controller:
 
Code:
public class extSearchDetail {
    public extSearchDetail(ApexPages.StandardController controller) { }

    public PageReference doSearch() {
      // please help
    }

    public String getValue() {
      // please help
    }
}

 I am not sure how to code the controller so I can reference the inputField, query the User table, and return the name.
 
Any help is appreciated.