You need to sign in to do that
Don't have an account?
Michaela Prambs
Creating a controller extension
Hello everybody,
does anyone have the code of the "SpeakerControllerExtension"-tab?
I think the order of my code is just wrong...
Thanks a lot
Michaela
does anyone have the code of the "SpeakerControllerExtension"-tab?
I think the order of my code is just wrong...
Thanks a lot
Michaela
https://developer.salesforce.com/trailhead/project/salesforce_developer_workshop/creating_controller_extension
Step 2: Extend the Data Model
In this step, you add two fields to the Speaker object: Picture_Path to store the location of the picture on the server, and Picture, a Formula field used to display the image in the Visualforce page.
In Setup, select Build > Create > Objects, and click the Speaker link.
In the Custom Fields & Relationships section, click New, and create a Picture_Path field defined as follows:
Data Type: Text
Field Label: Picture Path
Length: 255
Field Name: Picture_Path
Click Next, Next, Save & New.
Create a Picture field defined as follows:
Data Type: Formula
Field Label: Picture
Field Name: Picture
Formula Return Type: Text
Formula: IMAGE(Picture_Path__c, '')
Click Next, Next, Save.
I need the right code for the whole "SpeakerControllerExtension"-tab.
Setup- > tab - > then VF page tab.
http://ccoenraets.github.io/salesforce-developer-workshop/Creating-a-Controller-Extension.html
Let know if this works...
What made it work was fixing {!picture} to {!Speaker__c.Picture__c} on SpeakerForm.vfp
I also applied the SpeakerForm Visualforce Page to New and Edit links:
To do so, go to Stepup > Create > Objects > Speaker > Section: Buttons, Links, and Actions > Edit: Edit (do the same for New) > Override with: Visualforce Page: SpeakerForm[SpeakerForm]
Here is my final code for SpeakerForm.vfp
Here is my final code for SpeakerControllerExtension.apxc (which looks the same as the one shared by Kannan)