Skip to main content

I have a pick list field to select which office an interview will be scheduled and then will display a scheduling url based on which office is selected. I'm very new, so I will need help with a lot of the code to make this happen.  

 

Here's what I have so far as the visual force page 

 

<apex:page >  <apex:iframe src="Myschedulingurl" height="1200"></apex:iframe></apex:page>

 

 

#Salesforce Developer

1 risposta
  1. 27 dic 2025, 10:36

    Hi @Todd Scheid

     

    you just need a

    controller to drive the iframe URL based on the picklist value.

     

    In

    Salesforce, a Visualforce page can’t react to field values on its own. You need:

    1. A controller (or controller extension) to read the picklist value
    2. Logic to map the picklist value → scheduling URL
    3. Bind that URL to the iframe src

    High-level approach:

    • Pass the record Id to the VF page.
    • In the controller, query the record and read the Office picklist value.
    • Use simple conditional logic (if / switch) to return the correct scheduling URL.
    • Bind that value to <apex:iframe src="{!schedulingUrl}" />.

    This keeps everything clean, supported, and easy to extend when new offices are added.

    Once this is in place, changing the picklist automatically drives which scheduling page is shown — no hardcoding in the Visualforce page itself.

     

    Hope this helps. If it does, please mark it as the accepted answer so others can benefit as well. 

     

    Thanks, 

    Deepak

0/9000