• HoustonAPlus
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies

I have tried to implement the querymore to retrieve more than 200 records but unfortunately it is not retrieving additional records. Is there a basic example demonstrating queryMore pattern?

We currently use zksforce to preform queries and updates to records. However there are times when a client's device loses internet conection and when the client regains a connection, the client is unable to preform any functions with SF. What exactly is happening and what are some possible solutions to consider?

Is there a simple example of querying attachments from a contact record using zksforce?

I haven't had an issue with any of the browsers on a Windows machine or any of the browsers on a Mac except for the Firefox mac version.

 

I noticed that whenever I create more than three PanelBarItem it gives me something like this...

 

http://img38.imageshack.us/i/errorth.png/

where it does not expand when I click the bar.It does work on every browser on Windows and Mac except for Firefox for Mac.

 

Now I tried it again where I removed the css styling and i still get the same issue. I am wondering if anyone is having the same issue on Firefox for Mac.

 

Any feedback would be appreciated. Thanks!

I understand that the Blackberry and Android app for Chatter is coming out soon (i think), but I have checked the Android Market for apps and I noticed a couple of apps that support Chatter.

 

One of them is Seesimic by Seesmic that mentions it supports Chatter along with Twitter and Google Buzz and the other is called Chatter by Moe Khan.

 

Has anyone had any experience with either one of these apps?

I am trying to extend a standard controller, namely the Opportunity records. I created a VF page that has a custom extension that redirects if a certain condition is not met. I have placed the VF page into the Opportunity page layout and it works..however, it redirects within the field sort of like an iframe. So instead of redirecting the entire window, there is a frame that is showing the targetted page. It works as intended in the sandbox enviornment but oddly the production enviornment does not respond the same way. Is there a step that I am missing or perhaps I miscoded it?

 

VF Page that is inserted into the Opportunity page layout:

 

<apex:page StandardController="Opportunity"  extensions="ExtContactRole" action="{!HasContactRole}" rendered="true">
 

</apex:page>

this is my first attempt at writing apex code and I am encountering a roadblock with writing test code for a basic apex class.

 

public class ExtContactRoles{
    
    private final Opportunity temp;
    private Boolean ContactRoleFound;
    
    private ApexPages.StandardController controller;
    
    public ExtContactRoles(ApexPages.StandardController stdController){
        
        ContactRoleFound = false;
        this.temp = (Opportunity)stdController.getRecord();
        for (OpportunityContactRole o:[select Id from OpportunityContactRole where OpportunityId =:temp.Id]){
            
            ContactRoleFound = true;
            
        }
        
    }
    
    
    public PageReference HasContactRole(){
        
        if(!ContactRoleFound){
            PageReference pr = new PageReference('/p/opp/ContactRoleEditUi/e?oppid='+temp.Id);
            pr.setRedirect(true);
            return pr;
        }
        else return Apexpages.currentPage();
    }

}

 

I am trying to write a test class but considering that this is an extension and this my first time writing a test class, I am not sure how to go about it.

 

this is the visual force page that accompanies it. Also the code works fine in the sandbox envoirnment. What it is supposed to do is that every time an opportunity is created, it redirects the user to add contact roles for the opporutnity. If does have an opportunity, it does not redirect. I have this visual force page embedded to the opporunity layout.

 

<apex:page standardController="Opportunity" extensions="ExtContactRoles" action="{!HasContactRole}">

</apex:page>

I have tried to implement the querymore to retrieve more than 200 records but unfortunately it is not retrieving additional records. Is there a basic example demonstrating queryMore pattern?

Is there a simple example of querying attachments from a contact record using zksforce?

Hi,

 

  Is there a sample code snippet of using the search method of the zksForceClient when it returns objects of multiple types(like Account, Contact and others)? 

 

Thanks in advance and regards

I haven't had an issue with any of the browsers on a Windows machine or any of the browsers on a Mac except for the Firefox mac version.

 

I noticed that whenever I create more than three PanelBarItem it gives me something like this...

 

http://img38.imageshack.us/i/errorth.png/

where it does not expand when I click the bar.It does work on every browser on Windows and Mac except for Firefox for Mac.

 

Now I tried it again where I removed the css styling and i still get the same issue. I am wondering if anyone is having the same issue on Firefox for Mac.

 

Any feedback would be appreciated. Thanks!

I understand that the Blackberry and Android app for Chatter is coming out soon (i think), but I have checked the Android Market for apps and I noticed a couple of apps that support Chatter.

 

One of them is Seesimic by Seesmic that mentions it supports Chatter along with Twitter and Google Buzz and the other is called Chatter by Moe Khan.

 

Has anyone had any experience with either one of these apps?

I'm attempting to use a dataTable to create an entry grid for users to enter 1-many items.  Screenshots and snippets of code are below:
 
The issues I'm having in making this fully functional are:
  1. Enabling the "Delete" button on each line.  To enable this, what would be the optimum answer is having a commandButton Action like:
Code:
<apex:commandButton action="{!RemoveMaterial(lines.index)}" value="Delete" styleClass="btn" rerender="MaterialGrid" immediate="true"/>

The key difference, the RemoveMaterial(lines.index).

So the first question, is there any way to access the actual index of the List in a column of a dataTable?

The second question is passing parameters in the action parameter of the commandButton.  From previous attempts, I've found that I could pass a parameter in an action call, like shown above.  However, the current documentation (Spring 08) states on page 100 - "To add query string parameters to a commandButton, specify them in the associated action method".  Assuming this is true, how do you do this if not like above, and how would you set up the code in the class to access these parameters.

A third item that I ran into, however I'm planning to work around it for now, is if I make any of the inputFields required, when I add a second+ line, when a required field on a previous line is blank, I get the error message popping up stating that the field is required. I'd rather not yell :smileyhappy: at the user to they hit the "next" button (not shown in screenshot, but it's part of a multistep wizard)

I've got some less elegant alternatives for deleting a row that I might try, like placing regular html input buttons instead of commandButtons, etc., but I'm hoping to solve this without resorting to that, because then the code will be a bit bulkier to support this.  Based on the code involved so far, it should be pretty reusable for other grids.

Thanks for any assistance!

Jon Keener


 

, without resorting to Javascript onclick events(which I'm going to be investigating after this, but I foresee some of the same issues there also)

 
 
The Entry form is working nicely and the Add Another Material is working. 
 
 
 
 
Entry Form:
 
Page Snippet
Code:
<apex:pageBlockSection title="Material(s) to be included in Sample:" collapsible="false">
 <apex:dataTable value="{!sampleMaterials}" var="lines" styleClass="list" id="MaterialGrid">
  <apex:column> 
    <apex:facet name="header"><CENTER><b>Actions</b></CENTER></apex:facet>
    <apex:commandButton action="{!RemoveMaterial}" value="Delete" styleClass="btn" rerender="MaterialGrid" immediate="true"/>
  </apex:column> 
  <apex:column> 
    <apex:facet name="header"><b>Material Name</b></apex:facet> 
    <apex:inputField value="{!lines.name}"/>  
  </apex:column>  
  <apex:column>  
    <apex:facet name="header"><b>Sample Quantity</b></apex:facet>
    <apex:inputField value="{!lines.Sample_Quantity__c}"/>  
  </apex:column>  
  <apex:column>  
    <apex:facet name="header"><b>UOM</b></apex:facet>
    <apex:inputField value="{!lines.Sample_UOM__c}"/>  
  </apex:column> 
 </apex:dataTable> 
</apex:pageBlockSection> 

<apex:panelGrid columns="1"> 
    <apex:commandButton action="{!AddNewMaterial}" value="Add Another Material" styleClass="btn" rerender="MaterialGrid" immediate="true"/> 
</apex:panelGrid> 

 Controller Snippet
Code:
List<Sample_Material__c> sampleMaterials;

public List<Sample_Material__c> getSampleMaterials() {
    if (sampleMaterials == null)
       {
       //Initialize the Object
       sampleMaterials = new List<Sample_Material__c>();
       sampleMaterials.add(new Sample_Material__c());
       }
    return sampleMaterials;
}


public void AddNewMaterial() {
    if (sampleMaterials != null)
       {
       sampleMaterials.add(new Sample_Material__c());
       }
}

public void RemoveMaterial() {
}