• Hobbele
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hello everybody,

i get started with visualforce before 2 days and im very interested in it.

I tried to made a area (For Example a outputPanel with inputfields) onClick visible and invisible.

I tried it by using AJAX in a Page, but it doesnt work. Have anybody an idea?

Thank you for every answer!
Hi there.
I have the following apex class that is to send an email which includes
a visualforce email template.
Unfortunately when I include setTemplateID method that
has a parameter of the exact VF email template I want to send,
I get false. Everytime. If I remove the setTemplateID, I get an email,
minus my template.
Can anyone help me out please?
Here is my apex class
 
public class EmailCardListController {
 
public Boolean emailSent { get; set; }
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {'jbloggs@salesforce.com'};
 
    public PageReference sendMail() {
        mail.setToAddresses(toAddresses);
        mail.setReplyTo('jbloggs@salesforce.com');
        mail.setSenderDisplayName('Salesforce Support');
        mail.setSubject('New Case Created : ' + case.Id);
        mail.setUseSignature(false);
        mail.setTemplateId('00X200000015XFL');
        try {
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });   
            emailSent = true;
            return null;
        }catch(Exception e) {
             System.debug(e.getMessage());
             emailSent = false;
             return null;
        }
    }
}
 
And here is my Template;
<messaging:emailTemplate subject="Christmas Card List" recipientType="User" relatedToType="AccountTag" rendered="true">
    <messaging:htmlEmailBody >
     <p> please work! </p>
    </messaging:htmlEmailBody>
   <messaging:attachment fileName="cardList.csv">
         <c:cardList />
   </messaging:attachment>
</messaging:emailTemplate>
 
The custom component cardList is:
<apex:component controller="ChristmasCardController" access="global">
    <apex:repeat var="taggedAccount" value="{!taggedAccountsInformation}" >
        {!taggedAccount.Name}, {!taggedAccount.BillingStreet}, {!taggedAccount.BillingCity}, {!taggedAccount.BillingPostalCode}, {!taggedAccount.BillingState}, {!taggedAccount.BillingCountry}
    </apex:repeat>
</apex:component>
 
I know the custom component works, because I have tested it within a visual force page.
Please, Please can you help? Thank you very much
  • November 28, 2008
  • Like
  • 0

Is it possible to show the date lookup-component (similar to the one that is available when you edit a Date-field) in my custom s-control, or do I have to write my own validation code in javascript and use a standard HTML Form text field?


I want to be able to add a button to my account, which will pop up a new window with edit-fields for some of my fields in the page layout. I have so many fields on my account page layout that it would be nice just to see a subset of them when i click the button.

Thanks,
Joakim



 

  • October 19, 2007
  • Like
  • 0
Hello everybody,

i get started with visualforce before 2 days and im very interested in it.

I tried to made a area (For Example a outputPanel with inputfields) onClick visible and invisible.

I tried it by using AJAX in a Page, but it doesnt work. Have anybody an idea?

Thank you for every answer!