• Kuldeep
  • NEWBIE
  • 55 Points
  • Member since 2009

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies

Hi How do I get around this error message...

Collection size 1,609 exceeds maximum size of 1,000.

 

 

public String cname{get; set;} public List<SelectOption> getnames() { List<SelectOption> options = new List<SelectOption>(); List<Contact> namelist = new List<Contact>(); namelist = [Select Id, Name FROM Contact where Recordtype.name='Company' Order by LastName,FirstName]; options.add(new SelectOption('--None--','--None--')); for (Integer j=0;j<namelist.size();j++) { options.add(new SelectOption(namelist[j].Name,namelist[j].Name)); } return options; }

 

 

<td> <apex:outputlabel value="Company Names" for="cnamed" /> <apex:selectList value="{!cname}" size="1" id="cnamed"> <apex:actionSupport event="onchange" reRender="newvalue" /> <apex:selectOptions value="{!names}"/> </apex:selectList> </td>

 Thank you

 

 

I am developing a multi-picklist pop-up window for our need.

The left side has more than 4000 elements.
I am using a controller for dynamically generating the option list. The following code snippet explains this.

In the Program code:
                   <apex:selectList style="width:220px" size="10" multiselect="true" id="availableList" onfocus="skipcycle=true"         onblur="skipcycle=false" ondblclick="onAdd();">                   
                    <apex:selectOptions value="{!items_available}"/>                   
                    </apex:selectList>

In the controller,

public List<SelectOption> getItems_available()
    {
        List<SelectOption> options = new List<SelectOption>();
        for (Lead_Manager__c lm: [Select Name FROM Lead_Manager__c Where Is_Frequent__c = false and (Name like 'd%' or Name like 'e%' or Name like 'f%') ORDER BY Name ASC])
        {
                options.add(new SelectOption(lm.Name, lm.Name));       
        }
        return options;
    }

This returns a visualforce error., "System.Exception: collection exceeds maximum size: 1001"

Can anyone help on this?

We have a custom object that our partner portal users utilize and right now they can see user lookup fields but at a read-only state with no hyperlink to the user record. The issue is that when we run a report, the partner portal users cannot see the user fields on the report. I looked and saw that you can't open up read visiblity to partner portal profiles by editing the profile.

 

Does anybody know how we can set it up so our partner portal users can see user-object lookup fields on the report just as they can on the page layout for the custom object? Thanks.

Hi How do I get around this error message...

Collection size 1,609 exceeds maximum size of 1,000.

 

 

public String cname{get; set;} public List<SelectOption> getnames() { List<SelectOption> options = new List<SelectOption>(); List<Contact> namelist = new List<Contact>(); namelist = [Select Id, Name FROM Contact where Recordtype.name='Company' Order by LastName,FirstName]; options.add(new SelectOption('--None--','--None--')); for (Integer j=0;j<namelist.size();j++) { options.add(new SelectOption(namelist[j].Name,namelist[j].Name)); } return options; }

 

 

<td> <apex:outputlabel value="Company Names" for="cnamed" /> <apex:selectList value="{!cname}" size="1" id="cnamed"> <apex:actionSupport event="onchange" reRender="newvalue" /> <apex:selectOptions value="{!names}"/> </apex:selectList> </td>

 Thank you

 

 

Hi, I do have a page which have pageBlock table, I want to click the link in one of the row then jump to the line item edit page, after complete the edit page, click save button, the page can get back to the view page, so there I am using apex-param to pass the line item Id to the line item edit page, there is no problem when I click the link, the edit page shows up with respect record, but the problem is coming when I click the save button, the system give me a error message "System.QueryException: List has no rows for assignment to SObject Class.InnovationExtension.getInnovationToolItem: line 25, column 49
External entry point

Line Item Edit Page <apex:page standardController="In__c" showHeader="true" extensions="InnovationExtension" tabStyle="In__c"> <apex:sectionHeader title="Commercialization/Timing Items Edit" subtitle="{!InnovationToolItem.Name}"></apex:sectionHeader> <apex:form > <apex:pageBlock title="Edit" mode="Edit"> <apex:pagemessages /> <apex:pageBlockButtons > <apex:commandButton action="{!checkListItemSave}" value="Save" /> <apex:commandButton action="{!checkListItemCancel}" value="Cancel" /> </apex:pageBlockButtons> <apex:pageBlockSection title="General Information" columns="1"> <apex:outputField value="{!InnovationToolItem.Name}" style="width: 325px; height: 18px"/> <apex:inputField value="{!InnovationToolItem.Needed_or_Not__c}" /> <apex:inputField value="{!InnovationToolItem.Owner__c}" style="width: 200px; height: 18px"/> <apex:inputField value="{!InnovationToolItem.Target_Completion_Date__c}" style="width: 200px; height: 18px"/> <apex:inputField value="{!InnovationToolItem.Actual_Completion_Date__c}" style="width: 200px; height: 20px"/> <apex:inputField value="{!InnovationToolItem.Status__c}" style="width: 300px; height: 18px"/> <apex:inputField value="{!InnovationToolItem.Comments__c}" style="width: 600px; height: 72px"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <apex:relatedList subject="{!InnovationToolItem}" list="NotesAndAttachments" /> </apex:page>

 

"

master details - list view page:

 

<apex:page standardController="In__c" showHeader="true" extensions="InnovationExtension" tabStyle="In__c">
.......... 

<apex:pageBlock title="Commercialization Checklist" mode="view"> <!-- Display General Group --> <apex:pageBlockSection title="General" id="Generals" columns="1"> <apex:pageBlockTable value="{!Generals}" var="ge"> <apex:column value="{!ge.No__c}" width="50" /> <apex:column headervalue="Items" width="500"> <apex:commandLink action="{!checkListItem}" value="{!ge.Name}" > <apex:param name="Checklist" value="{!ge.id}"/> </apex:commandLink> </apex:column> <apex:column headerValue="Needed?" width="50" > <apex:outputField value="{!ge.Needed_or_Not__c}" /> </apex:column> <apex:column headerValue="Exist?" width="50" > <apex:outputField value="{!ge.Exist_or_Not__c}" /> </apex:column> <apex:column headerValue="Owner" width="150" > <apex:outputField value="{!ge.Owner__c}" /> </apex:column> <apex:column headerValue="Original Target Completion Date" width="150" > <apex:outputField value="{!ge.Target_Completion_Date__c}" /> </apex:column> <apex:column headerValue="Forecast/Actual Completion Date" width="150" > <apex:outputField value="{!ge.Actual_Completion_Date__c}" /> </apex:column> <apex:column headerValue="Status" width="150" > <apex:outputField value="{!ge.Status__c}" /> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection>

 

 

 

standard controller extension public class InnovationExtension { private final In__C Innovations; List<Innovation_Tool__c> Launchs; Innovation_Tool__c InnovationToolItem; public Innovation_Tool__c getInnovationToolItem(){

//Error here, when I click the save button in line item page, the system give the the error displayed above. Innovation_Tool__c InnovationToolItem = [Select Id, IsDeleted, Name, No__c, Innovation__c, Needed_or_Not__c, Exist_or_Not__c, Group__c, Owner__c, Target_Completion_Date__c, Actual_Completion_Date__c, Status__c, Comments__c FROM Innovation_Tool__c where Id = :ApexPages.currentPage().getParameters().get('Checklist')]; return InnovationToolItem; } public InnovationExtension(ApexPages.StandardController controller) { this.Innovations = (In__C)controller.getRecord(); InnovationsList = [Select Id, IsDeleted, Name, Market_Drivers_Trends__c FROM In__c where Id = :ApexPages.currentPage().getParameters().get('id') Limit 1]; Launchs = (List<Innovation_Tool__c>)[Select Id, IsDeleted, Name, No__c, Innovation__c, Needed_or_Not__c, Exist_or_Not__c, Group__c, Owner__c, Target_Completion_Date__c, Actual_Completion_Date__c, Status__c FROM Innovation_Tool__c where Innovation__c = :ApexPages.currentPage().getParameters().get('id') and Group__c='Launch' order by No__c]; } public PageReference checkListItem() { PageReference pdfPage = Page.ADPItemEdit; pdfpage.setRedirect(false); return pdfPage; } public PageReference checkListItemSave() { update InnovationToolItem; return Page.Innovation; } public PageReference checkListItemCancel() { return Page.Innovation; } }

 

 

I used same standard controller extension in both pages, as per the tips from Visualforce Page developer wazird guide line, the controll should not be rerender when I switched in different page but use same controller, not sure where wrong, Please save me!!!

 

Thanks a lot

 

 

I have a list of a custom object that I display on a VisualForce page using a dataTable. The dataTable has four columns. The first is outputText, the second and third inputText, and the fourth inputCheckbox. The user modifies the contents of the inputText and inputCheckbox and then saves (updates). Initially everything works as expected. However after a few successful saves I always get the following error message:

<apex:inputText> element value must resolve to a String type!

If I log out, close the browser, and then return to the page I still get the error. I've read a few articles related to this type of functionality and my code seems to be using the correct approach.

Any thoughts on this?

Here is the code:

Code:
public class UpdateContractUsageStats {
 
        private final List<Contract_Usage_Data__c> ContractUsageData;
        
        public UpdateContractUsageStats() {
   
   ContractUsageData = [Select Id, Usage_Report_Interval_Label__c, Usage_Report_Date__c, UsageLives__c, UsageAmount__c, Usage_Report_Certified__c From Contract_Usage_Data__c Where Contract__c=: ApexPages.currentPage().getParameters().get('cid')];
        }
        
  public PageReference save() {
   try{
    update ContractUsageData;
   }
   catch(DmlException ex){
    ApexPages.addMessages(ex);
   }
   return null;
  }
        
        public List<Contract_Usage_Data__c> getContractUsageData(){
                return ContractUsageData;
        }
}

 
Code:
<apex:page controller="UpdateContractUsageStats">
 <apex:messages />
    <apex:form >
        <apex:dataTable value="{!ContractUsageData}" var="intervalData" id="theTable" rowClasses="odd,even" styleClass="tableClass">
            <apex:column width="25%">
                    <apex:facet name="header">Interval</apex:facet>
                    <apex:outputText value="{!intervalData.Usage_Report_Interval_Label__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Lives</apex:facet>
                    <apex:inputText value="{!intervalData.UsageLives__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Usage Amount</apex:facet>
                    <apex:inputText value="{!intervalData.UsageAmount__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
            <apex:column >
                    <apex:facet name="header">Certified</apex:facet>
                    <apex:inputCheckbox value="{!intervalData.Usage_Report_Certified__c}" disabled="{!intervalData.Usage_Report_Certified__c}"/>
            </apex:column>
        </apex:dataTable>
        <apex:commandButton value="Update Statistics" id="theButton" action="{!save}"/>
    </apex:form>
</apex:page>

 


  • October 16, 2008
  • Like
  • 0
I am developing a multi-picklist pop-up window for our need.

The left side has more than 4000 elements.
I am using a controller for dynamically generating the option list. The following code snippet explains this.

In the Program code:
                   <apex:selectList style="width:220px" size="10" multiselect="true" id="availableList" onfocus="skipcycle=true"         onblur="skipcycle=false" ondblclick="onAdd();">                   
                    <apex:selectOptions value="{!items_available}"/>                   
                    </apex:selectList>

In the controller,

public List<SelectOption> getItems_available()
    {
        List<SelectOption> options = new List<SelectOption>();
        for (Lead_Manager__c lm: [Select Name FROM Lead_Manager__c Where Is_Frequent__c = false and (Name like 'd%' or Name like 'e%' or Name like 'f%') ORDER BY Name ASC])
        {
                options.add(new SelectOption(lm.Name, lm.Name));       
        }
        return options;
    }

This returns a visualforce error., "System.Exception: collection exceeds maximum size: 1001"

Can anyone help on this?