• Fred Kampf 3
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi all,

I focus more on the Admin side of things in our environment.  I've been messing around with a task to get an "eye popper" to appear on our Account Page Layout.  The goal is to bring in one field into a VF Page called "Account_Status__c".  This picklist contains the values "Active", "Dormant", "Inactive".  We want to place the VF Page in it's own section of the Account Page Layout.  For each value, we want to display them in large, bold letters with a colored highlight.  See highlights below:
  • Active = Green Highlight
  • Dormant = Yellow Highlight
  • Inactive = Red Highlight
Any advice on where to start or how to get this setup as a VF Page with a Controller would be sincerely appreciated.

Thank you~

After winter'21 release as Edit, Delete, Modify all and View all permission has been revoked from the Guest user profile (Unauthenticated) so as to make custom VF pages work unauthenticated and to perform edit operation ignoreEditPermissionForRendering (Salesforce Suggestion (https://help.salesforce.com/articleView?id=release-notes.rn_networks_guest_user.htm&release=228&type=5)) parameter has been added to all the Apex Inputfields but even after that when we try to update records we are getting error like this.

User-added image
Any help would be much appreciated.

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
                     ].Name;
       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.

 

Thanks!