• Chris A
  • NEWBIE
  • 5 Points
  • Member since 2015
  • Owner
  • Andrews Consulting


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
In Apex test code, it appears that the ServiceAppointment auto create flag on the WorkType is not respected.  When I create a WorkOrder, a ServiceAppointment is always created.  I've tried creating a new WorkType with the flag set to false and then creating the WorkOrder.  I've also changed the flag on all existing WorkTypes before creating a WorkOrder and in all cases, a ServiceAppointment is created. It's pushing me over my SOQL limit for test code and I'm not able to deploy a fix for the customer. Has anyone else experienced a similar issue?   
I don't know how i missed this before, but recently i realized, that my accountList vf page doesnt work without id.
And it is ok if we use standardController only. But if we use recordSetVar, which should give us some random elements form database, why it needs id also?

Lets say we created this VF page:
<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
  <apex:pageBlock >
    <apex:pageBlockTable value="{!accounts}" var="a">
      <apex:column value="{!a.name}"/>
    </apex:pageBlockTable>
  </apex:pageBlock>
</apex:page>
Then we click Preview and dont see anything.
User-added image

Now if we check the link we will find something like ...​visual.force.com/apex/AccountListTest?core.apexpages.request.devconsole=1
Let's add any id, even fake one: ...​visual.force.com/apex/AccountListTest?core.apexpages.request.devconsole=1&id=11111000003hffW
Boom! It works now:
User-added image


 
  • March 19, 2015
  • Like
  • 0