• Michael_Johnson
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 11
    Replies

Hi All,

 

I am having an issue with apex repeat displaying a list of records. My query is retrieving 23 rows but only 20 are being displayed. 

 

Here is the actual Apex query

 

 

 public ApexPages.StandardSetController setCon2 {

        get {

            if(setCon2 == null && ModuleId != null) {

             setCon2 = new ApexPages.StandardSetController([Select Id, IMAX_URL__c, IMAX_APIKey__c, IMAX_Version__c, PCMX_Version__c from Module__c where Id =: ModuleId LIMIT 1]);

            }

            return setCon2;

        }

        set;

    }  

 

    public list<IMAX_Device__c> getDevices() {

         if(ModuleId != null && setCon != null){

          return (List<IMAX_Device__c>) setCon.getRecords();

         }else{

          return null;

         }

    }

 

 

Here is the Visualforce repeat

 

 

<apex:repeat var="d" value="{!devices}"> 
<div class="middle"> 
  <div class="innermiddle"><span id="{!d.Id}" class="{!d.Active__c}"><apex:inputcheckbox value="{!d.Active__c}" id="checkbox" onclick="setCheckboxDisplay(this,'{!d.Id}'),saveDevices(),setTimeout('rerendermessages()',5000)" styleClass="styledCheckbox"/></span><span style="margin-left:1px;"><apex:inputtext styleclass="rounded3" value="{!d.Device_Name__c}" size="9"/></span> 
    <span style="margin-left:0px;"><apex:inputtext styleclass="rounded2" value="{!d.Name}" size="17"/></span> 
    <span style="margin-left:0px;;"><apex:commandlink styleclass="history" value="History" action="{!nullaction}" rerender="loginhistory"><apex:param name="deviceid" value="{!d.id}" /></apex:commandlink></span> 
    <span style="margin-left:1px;"><apex:commandlink styleclass="delete" action="{!delRow}" value="Delete" oncomplete="reloadwindow()"><apex:param name="delid" value="{!d.Id}"/> 
    </apex:commandlink> </span> </div>
</div>
</apex:repeat> 
The debug log shows 23 rows retrieved yet only 20 device lines are displayed on the screen below. Anyone have any ideas?
13:15:53.180|SOQL_EXECUTE_BEGIN|[22]|Aggregations:0|select Id, Active__c, Device_Name__c, Name from IMAX_Device__c where Module__c =: ModuleId and isDeleted = false order by CreatedDate asc
13:15:53.186|SOQL_EXECUTE_END|[22]|Rows:23

 

Hi All,

 

I am using CMSForce to build content of one of my current sites and am also using a URL rewriting class. The issue I am having is when using the submit button on a webform page, or calling any pagereference method, the URL rewriter class is called first and the method to save the form never gets executed. Has anyone run into similar issues using URL rewriter, and if so - have you found any workarounds? I appreciate any help with this!

I am trying to create a task for the group event owner whenever a contact first replies to the time available email request. With some monitoring I noticed when a contact confirms the meeting the eventattendee associated with the contact gets updated, but I can't find what object an update is made to when a contact responds to hours available. Is this an internal update in Salesforce I have no access to querying or is there a field on some object where a record gets updated with available times? It would be nice if there were some documentation somewhere on a code level of the process of scheduling a meeting using cloud scheduler.

I'm stuck on this test class, I don't think I am consrtucting it correctly as I am incorrectly refrecing the object. This is my first time writing a test class for an extension class.

System.NullPointerException: Attempt to de-reference a null object - Class.testTotalGPbyDiv.testTotalGPbyDiv: line 4, column 1 External entry point
 

 

 

public class testTotalGPbyDiv {
static testMethod void testTotalGPbyDiv(){
Division__c div;
div.name = 'Hampton Test';
insert div;

ApexPages.currentPage().getParameters().put('id', div.Id);
ApexPages.StandardController std=new ApexPages.StandardController(div);

TotalGPbyDiv controller=new TotalGPbyDiv(std);

}
}

 

 


I'm really lost right now on how to get this to complie. Any thoughts?

 

_chris

  • March 17, 2011
  • Like
  • 0

Hi All,

 

I would be most grateful for your views on what is the best approach here.

 

The scenario is as follows. I have a trigger that when fires it should update a large number of records of an object related to the one associated with the trigger.

The delicate bit here is that the number of related records is large, of the order of hundreds of thousands.

 

I am considering two approaches. One based on Batch Apex and the other based on @future call.

 

In the case of Batch Apex I would in the trigger kick a Batch Apex job using a query locator that fetches all the related records that need to be updated. In the Batch Apex implementation (execute method) I would then process the related records and update them.

 

In the approach using @future I would in the trigger collect the records of the object associated with the trigger,and pass them to an @future call. Within the @future call implementation I would fetch the related records with an SOQL for loop (so it does it in batches), loop over the related objects, process them and when done with the batch, update them.

 

In neither case I see running into issues with governor limits but I might be wrong.

 

Any views on what would be the best approach ?

 

Thank you very much in advance,

Fernando

 

Hi All,

 

I am having an issue with apex repeat displaying a list of records. My query is retrieving 23 rows but only 20 are being displayed. 

 

Here is the actual Apex query

 

 

 public ApexPages.StandardSetController setCon2 {

        get {

            if(setCon2 == null && ModuleId != null) {

             setCon2 = new ApexPages.StandardSetController([Select Id, IMAX_URL__c, IMAX_APIKey__c, IMAX_Version__c, PCMX_Version__c from Module__c where Id =: ModuleId LIMIT 1]);

            }

            return setCon2;

        }

        set;

    }  

 

    public list<IMAX_Device__c> getDevices() {

         if(ModuleId != null && setCon != null){

          return (List<IMAX_Device__c>) setCon.getRecords();

         }else{

          return null;

         }

    }

 

 

Here is the Visualforce repeat

 

 

<apex:repeat var="d" value="{!devices}"> 
<div class="middle"> 
  <div class="innermiddle"><span id="{!d.Id}" class="{!d.Active__c}"><apex:inputcheckbox value="{!d.Active__c}" id="checkbox" onclick="setCheckboxDisplay(this,'{!d.Id}'),saveDevices(),setTimeout('rerendermessages()',5000)" styleClass="styledCheckbox"/></span><span style="margin-left:1px;"><apex:inputtext styleclass="rounded3" value="{!d.Device_Name__c}" size="9"/></span> 
    <span style="margin-left:0px;"><apex:inputtext styleclass="rounded2" value="{!d.Name}" size="17"/></span> 
    <span style="margin-left:0px;;"><apex:commandlink styleclass="history" value="History" action="{!nullaction}" rerender="loginhistory"><apex:param name="deviceid" value="{!d.id}" /></apex:commandlink></span> 
    <span style="margin-left:1px;"><apex:commandlink styleclass="delete" action="{!delRow}" value="Delete" oncomplete="reloadwindow()"><apex:param name="delid" value="{!d.Id}"/> 
    </apex:commandlink> </span> </div>
</div>
</apex:repeat> 
The debug log shows 23 rows retrieved yet only 20 device lines are displayed on the screen below. Anyone have any ideas?
13:15:53.180|SOQL_EXECUTE_BEGIN|[22]|Aggregations:0|select Id, Active__c, Device_Name__c, Name from IMAX_Device__c where Module__c =: ModuleId and isDeleted = false order by CreatedDate asc
13:15:53.186|SOQL_EXECUTE_END|[22]|Rows:23

 

Hey Everyone -

 

I have a custom object that I want to display within the opportunity page layout as it's own section.  The VF page will render certain fields/sections based on how other fields are filled in.  I have the object/ fields and VF page built but I cannot get the controller to work so I can place it in the Opportunity layout.

 

I attempted to build a list type of controller

public class Questionnaire {
    public Questionnaire(ApexPages.StandardController controller){}
        List<Questionnaire>Questions;
        publicList<Questionnaire>getQuestions(){
            Questions=[select *FIELDS* from Questionnaire__c];
            return Questions;
    }  
}

 

 

But kept receiving a compile errore for invalid public list.  I just need to be able to display the fields so I'm unsure if list is even the way to go.

 

Obviously I'm really new to all this.  Any help would be appreciated.

 

Thanks,

We have a time based workflow rule that updates a field on an opportunity.  When the field is updated by the rule, a trigger is fired.  In the trigger logic, we do different work depending on the user executing the trigger.  Who is the user running the time-based workflow rule?  Is there any way to control who the user is?  We would like to dictate the path taken in our logic (solely user based) but it appears that the user executing the workflow rule is the user who last modified the opportunity.  This is causing problems for us and seems extremely arbitrary.  Is there a workaround?

 

Andrew

Hi All,

 

I am using CMSForce to build content of one of my current sites and am also using a URL rewriting class. The issue I am having is when using the submit button on a webform page, or calling any pagereference method, the URL rewriter class is called first and the method to save the form never gets executed. Has anyone run into similar issues using URL rewriter, and if so - have you found any workarounds? I appreciate any help with this!

My developer org was upgraded to Summer '10. I'm unable to implement a Site.UrlRewriter as per the developer docs. Returns the error: Invalid class: urlrewriter.

 

Any ideas?

Hello everyone,

 

I have two users who use Outlook Sync successfully and have for about a year now. About 1.5 weeks ago, they experienced some errors when trying to sync up their contacts and events as seen below:

“There is a change in the field mapping. Please verify your field mappings and Restart Outlook. INVALID_Field: □SelectId,LastModifiedDate,Subject,IsAlldayEvent,ActivityDate,ActivityDateTime□

I checked their field mappings and they are identical to mine and I can sync with no error.  The fields listed above in the error are coming from the "Events" page if that is helpful.  The strange thing is that I have the same version of Outlook, same Exchange server, same version of the Outlook tool and I can sync successfully, but these two users have been getting the same errors. We migrated some data into a dev account and in sandbox to test it and no errors as well. I just would like to know if there is anyone that can shed some light on our issues so we can fix it for the users who actually count on this feature.

Thank you and have a great day!