• @jpmaria
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
for classic email template using VF page - & can be displayed in messaging:htmlEmailBody using & but in same template messaging:attachment does not support & or & . for a csv attachment when placing & in messaging:attachment  - it shows error, and when placing &  it comes as '&' itself
for classic email template using VF page - & can be displayed in messaging:htmlEmailBody using & but in same template messaging:attachment does not support & or & . for a csv attachment when placing & in messaging:attachment  - it shows error, and when placing &  it comes as '&' itself

I'm hoping someone can tell me what I'm doing wrong here.  Whenever I press the "Count Selected" button, this is what shows up in the debug log no matter how many records I have manually selected on the displayed page:

 

[20]|DEBUG|xyzzy: Num Selected 0

 

Here is the page, followed by the controller.  Obviously these are slimmed down from the actual page and controller I am working on.

 

<apex:page standardController="Account" recordSetVar="true" extensions="aaaDonNotPackageController" id="page">
    <apex:pageBlock mode="mainDetail" id="PB" >
        <apex:form id="form">
            <apex:commandButton value="Count Selected" action="{!CountSelected}" /> 
        </apex:form>            
        <apex:enhancedList id="list" type="Account" height="570" width="1200" rowsPerPage="25"  customizable="true"/>
    </apex:pageBlock>
</apex:page>

 

global with sharing class aaaDonNotPackageController 
{
    public ApexPages.StandardSetController setController;
 
    // Constructor    
    public aaaDonNotPackageController (ApexPages.StandardSetController controller)
    {
        Initialize(controller);
    }   
    
    // placed outside constructor for easier debugging    
    private void Initialize (ApexPages.StandardSetController controller)
    {
        setController = controller;
    }
    
    public void CountSelected()
    {
        List<sObject> selAccts = setController.getSelected (); 
        system.debug ('xyzzy: Num Selected ' + string.valueof(selAccts.size()));                    
    }
}

 

I'm looking for something like this:

Schema.CurrentUser.Opportunity.getDefaultRecordType();

 

Thanks!