• serenity
  • NEWBIE
  • 0 Points
  • Member since 2011

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

In my Visualforce page I'm using a standardController with the extensions=""

 

The Visualforce page is used as a custom List Button which allows users to select multiple records in an enhanced list.

 

I have a command button that is supposed to call a method, but for some reason, the method never gets fired.

 

Have set up some debug logs to see if there is any data at all, and nothing comes up in the debug. Any ideas on why this command won't fire properly would be appreciated.

 

<apex:page standardController="pse__Timecard__c" 
                   extensions="TimecardSplitButtons" 
                 recordSetVar="tcSplits">
    <apex:pageMessages />
    <apex:form >
        <apex:commandButton action="{!UnholdForBilling}" value="Unhold for Billing"/>
    </apex:form>
</apex:page>


public with sharing class TimecardSplitButtons {

    private ApexPages.StandardSetController ssc;

    // Local Variables
    public List<pse__Timecard__c> tcIds = new List<pse__Timecard__c>();

    // Constructor
    public TimecardSplitButtons(ApexPages.StandardSetController ssc) {
        this.ssc = ssc;
    }

    public void UnholdForBilling() {
        this.tcIds = this.ssc.getRecords();
        System.debug('3 - ' + this.tcIds.size());
        if (this.tcIds.size() > 0) {
            List<pse__Timecard__c> tcsValidate = [SELECT Id, pse__Timecard_Header__c,
                                                         pse__Timecard_Header__r.pse__Project__r.Id, pse__Timecard_Header__r.pse__Project__r.pse__Closed_for_Time_Entry__c,
                                                         pse__Timecard_Header__r.pse__Assignment__r.Id, pse__Timecard_Header__r.pse__Assignment__r.pse__Closed_for_Time_Entry__c
                                                    FROM pse__Timecard__c
                                                   WHERE Id IN :this.tcIds AND
                                                         pse__Billable__c = true AND
                                                         pse__Billed__c = false AND
                                                         pse__Approved__c = true AND
                                                         pse__Invoiced__c = false AND
                                                         pse__Total_Billable_Amount__c > 0];
            
...
...
...
        }
    }

}

 

 

 

In my Visualforce page I'm using a standardController with the extensions=""

 

The Visualforce page is used as a custom List Button which allows users to select multiple records in an enhanced list.

 

I have a command button that is supposed to call a method, but for some reason, the method never gets fired.

 

Have set up some debug logs to see if there is any data at all, and nothing comes up in the debug. Any ideas on why this command won't fire properly would be appreciated.

 

<apex:page standardController="pse__Timecard__c" 
                   extensions="TimecardSplitButtons" 
                 recordSetVar="tcSplits">
    <apex:pageMessages />
    <apex:form >
        <apex:commandButton action="{!UnholdForBilling}" value="Unhold for Billing"/>
    </apex:form>
</apex:page>


public with sharing class TimecardSplitButtons {

    private ApexPages.StandardSetController ssc;

    // Local Variables
    public List<pse__Timecard__c> tcIds = new List<pse__Timecard__c>();

    // Constructor
    public TimecardSplitButtons(ApexPages.StandardSetController ssc) {
        this.ssc = ssc;
    }

    public void UnholdForBilling() {
        this.tcIds = this.ssc.getRecords();
        System.debug('3 - ' + this.tcIds.size());
        if (this.tcIds.size() > 0) {
            List<pse__Timecard__c> tcsValidate = [SELECT Id, pse__Timecard_Header__c,
                                                         pse__Timecard_Header__r.pse__Project__r.Id, pse__Timecard_Header__r.pse__Project__r.pse__Closed_for_Time_Entry__c,
                                                         pse__Timecard_Header__r.pse__Assignment__r.Id, pse__Timecard_Header__r.pse__Assignment__r.pse__Closed_for_Time_Entry__c
                                                    FROM pse__Timecard__c
                                                   WHERE Id IN :this.tcIds AND
                                                         pse__Billable__c = true AND
                                                         pse__Billed__c = false AND
                                                         pse__Approved__c = true AND
                                                         pse__Invoiced__c = false AND
                                                         pse__Total_Billable_Amount__c > 0];
            
...
...
...
        }
    }

}