• juaco
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi:

 

I'm new to Visualforce and I'm trying to retrieve the size of a VisualforceArrayList.

 

I'm aware that I can use the <apex:repeat> component this way:

 

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line">
  <tr>
   <td>{!line.PricebookEntry.ProductCode}</td>
   <td>{!line.PricebookEntry.Name}</td>
   <td>{!line.Quantity}</td>
   <td><apex:OutputField value="{!line.UnitPrice}"/></td>
   <td><apex:OutputField value="{!line.TotalPrice}"/></td>
 </tr>
</apex:repeat>

 

But what if I just want to know the number of LineItems inside my Opportunity.OpportunityLineItems VisualforceArrayList?

 

Is there a way to achieve this?

Something like .size() for ArrayLists or .length for Arrays in Java?

 

The other problem I have is that I'm using a Professional Edition License and it seems that I'm not able to create a Visualforce Custom Controller so I need to do it from the actual visualforce page.

 

Help would be very appreciated.

 

 

 

  • July 29, 2009
  • Like
  • 0

Hi:

 

I'm new to Visualforce and I'm trying to retrieve the size of a VisualforceArrayList.

 

I'm aware that I can use the <apex:repeat> component this way:

 

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line">
  <tr>
   <td>{!line.PricebookEntry.ProductCode}</td>
   <td>{!line.PricebookEntry.Name}</td>
   <td>{!line.Quantity}</td>
   <td><apex:OutputField value="{!line.UnitPrice}"/></td>
   <td><apex:OutputField value="{!line.TotalPrice}"/></td>
 </tr>
</apex:repeat>

 

But what if I just want to know the number of LineItems inside my Opportunity.OpportunityLineItems VisualforceArrayList?

 

Is there a way to achieve this?

Something like .size() for ArrayLists or .length for Arrays in Java?

 

The other problem I have is that I'm using a Professional Edition License and it seems that I'm not able to create a Visualforce Custom Controller so I need to do it from the actual visualforce page.

 

Help would be very appreciated.

 

 

 

  • July 29, 2009
  • Like
  • 0
I have created a Visualforce email template that automatically attaches a PDF rendering of a quote from the opportunity object. It works fine when manually selecting the template from the email author page.

However, if I create a custom button on the opportunity page to take me to the email author page with the whoid, whatid, and template id defined in the URL, the email subject and body show up just fine but there is no attachment. Anyone else run into this? Any ideas on a fix?

Message Edited by trsmith on 11-17-2008 01:08 PM

Message Edited by trsmith on 11-17-2008 01:10 PM