• SPruitt
  • NEWBIE
  • 0 Points
  • Member since 2012

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

At the bottom of the developer docs page for the Apex Scheduler, there is a list of example time and date expressions.  One of them is every day at 1PM.  This is the schedule I need except I want my job to run at midnight.  The pattern in the example is 0 0 13 * * ?.  For my schedule, I changed it to 0 0 0 * * ? to get a midnight run.

 

After scheduling the job, the Scheduled Jobs monitor has the time correct (its midnight), but the date schedule is Monthly, On day 1.  This means run on the first day of each month only?

 

Can someone explain why I seem to get a different schedule date, from what the pattern is stating?

 

Thanks.

I have a simple logger framework for creating logs for certain actions.  I started getting "You have uncommitted work pending" due to a callout occuring after I inserted a new log entry.  The board suggestions for solving the problem specified using future calls for the callout.  The failing callout is called by a VF page that is displayed after the log is written.  There is no relationship between the log entry and the subsequent call.

 

I didn't read anything forbidding an insert statement in a future call, so I use the future call for insert the log entry.  When I executed again, I got the same error.  This was puzzling, so I edited out the code where I execute the insert and ran again and I still got the same errror.

 

Obviously I don't understand what is really happening.  Does a @future Apex job create a "transaction", or in some other way prevent subsequent callouts?

 

Any suggestions for alternate approach is appreciated.

Is there a technique for padding spaces in the label when creating SelectOption instances in a controller?  The multiple spaces I put in get trimmed to a single space.

The line:

 

<apex:pageBlockTable value="{!tiers}" var="tier">

     <apex:column value="{!FLOOR(tier.unit__c)}"/>

 

produces this runtime problem:

 

Syntax error. Missing ')'
Error is in expression '{!FLOOR(tier}' in component <apex:pageBlockTable> in page subscription

If I have a radio button defined as below everything works ok.  The field ratePlanId is updated with the selected value.

 

<apex:page controller="MyController">

   <apex:form>

      <apex:pageBlock>

           <apex:pageBlockSection id="ratePlanTable" title="Rate Plans">

                <apex:selectRadio id="ratePlanSelector" layout="pageDirection" value="{!ratePlanId}" required="true">

                     <apex:selectOptions value="{!ratePlans}"/>

                </apex:selectRadio>

            </apex:pageBlockSection>

       </apex:pageBlock>

    </apex:form>

</apex:page>

 

when I modify the page and add an additional radio button as below the ratePlanId setter is never called.  Oddly enough, from the debug log it looks the getter is called again instead of the setter.

 

             :  page block section with first radio button located here

             <apex:pageBlockSection id="ratePlanChargeTable" title="Rate Plan Charges">

                    <apex:selectRadio layout="pageDirection" value="{!ratePlanChargeId}" required="true">

                       <apex:selectOptions value="{!ratePlanCharges}"/>

                   </apex:selectRadio>

             </apex:pageBlockSection>

        </apex:pageBlock>

    </apex:form>

</apex:page>

 

Why does the presence of a second radio buttion cause the first radio button to no longer set a value when selected?

The following is defined on a VPage

 

<apex:form>

     <apex:actionFunction name="checkSameAsCustomer" action="{!sameAsCustomer}" rerender="billToSection">
          <apex:param name="checkSameAsParam" assignTo="{!isSameAsCustomer}" value="sameAsCustomerCheck.selected"/>
     </apex:actionFunction>

     <apex:pageBlock>

             :

          <apex:inputCheckbox id="sameAsCustomerCheck" label="Billing same as above" onselect="checkSameAsCustomer" immediate="true"/>

          <apex:pageBlockSection id="billToSection">

             :

 

The inputcheckbox doesn't appear to be invoking the actionFunction.  My controller's implementation of sameAsCustomer writes to the debug log, but nothing shows up.

 

I have tried setting onselect, onchange, and onclick.  Also, as a separate issue the inputcheckbox label never shows either.

 

Thanks in advance.

Is there a technique for padding spaces in the label when creating SelectOption instances in a controller?  The multiple spaces I put in get trimmed to a single space.

If I have a radio button defined as below everything works ok.  The field ratePlanId is updated with the selected value.

 

<apex:page controller="MyController">

   <apex:form>

      <apex:pageBlock>

           <apex:pageBlockSection id="ratePlanTable" title="Rate Plans">

                <apex:selectRadio id="ratePlanSelector" layout="pageDirection" value="{!ratePlanId}" required="true">

                     <apex:selectOptions value="{!ratePlans}"/>

                </apex:selectRadio>

            </apex:pageBlockSection>

       </apex:pageBlock>

    </apex:form>

</apex:page>

 

when I modify the page and add an additional radio button as below the ratePlanId setter is never called.  Oddly enough, from the debug log it looks the getter is called again instead of the setter.

 

             :  page block section with first radio button located here

             <apex:pageBlockSection id="ratePlanChargeTable" title="Rate Plan Charges">

                    <apex:selectRadio layout="pageDirection" value="{!ratePlanChargeId}" required="true">

                       <apex:selectOptions value="{!ratePlanCharges}"/>

                   </apex:selectRadio>

             </apex:pageBlockSection>

        </apex:pageBlock>

    </apex:form>

</apex:page>

 

Why does the presence of a second radio buttion cause the first radio button to no longer set a value when selected?

The following is defined on a VPage

 

<apex:form>

     <apex:actionFunction name="checkSameAsCustomer" action="{!sameAsCustomer}" rerender="billToSection">
          <apex:param name="checkSameAsParam" assignTo="{!isSameAsCustomer}" value="sameAsCustomerCheck.selected"/>
     </apex:actionFunction>

     <apex:pageBlock>

             :

          <apex:inputCheckbox id="sameAsCustomerCheck" label="Billing same as above" onselect="checkSameAsCustomer" immediate="true"/>

          <apex:pageBlockSection id="billToSection">

             :

 

The inputcheckbox doesn't appear to be invoking the actionFunction.  My controller's implementation of sameAsCustomer writes to the debug log, but nothing shows up.

 

I have tried setting onselect, onchange, and onclick.  Also, as a separate issue the inputcheckbox label never shows either.

 

Thanks in advance.