• Priya Parab
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
I am trying to include a conditional logic in my custom Email Template, which includes merge fields.
When I include the following formula in my template:
<br />• Case #: {!IF(Case.RecordType ="Enterprise", {!Case.CaseNumber}, "not enterprise")}

The output in my email template looks as follows:
Case #: , "not enterprise")}

And when I edit the Email Template again, I can see that my code had changed to the following:
<br />• Case #: {!NullValue(IF(Case.RecordType ="Enterprise", "{!Case.CaseNumber")}, "not enterprise")}

Why is that?

Hi everyone.  I am trying to understand how to use the get; set; methods.  Here is my block of code:


public class LogoImage {

    public LogoImage(ApexPages.StandardController controller) {
        get{  return image;  }
        set{  image = value; }

    // get a company logo: based on user log in, strip spaces, return image name
    public String getImageName(){     
       String file = [SELECT Name 
                        FROM Account 
                       WHERE Id IN 
                            (SELECT AccountId 
                               FROM user 
                              WHERE username=:UserInfo.getUsername()
                       LIMIT 1
       file = file.replace(' ', '');  
       String foldername = 'Logos/';
       String extension = '.jpg';
       String fullImageName = foldername + file + extension;
       return fullImageName;

 I am trying to understand what the Apex Developer's Guide means and I obviously don't (so say my error messages :)  )  ... Could someone please show me (in code, not links to more reading material) an example of how I would want to use the get set method?


I should also point out that without the get/set this works on my visualforce pages.  My partner portal users get a logo image on their page of their company when they log in.  But I want to understand gets and sets so I can write pages and classes that are ... well, not crappy.