• Pedro Cardoso 13
  • NEWBIE
  • 10 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi! I'm returning the following page reference in a Save method in a controller extension for a VF page:

pageReference('/lightning/r/Account/' + [Account's Id] + '/view') 

which works fine in Standard navigation mode, redirecting to the detail page, but in Console mode it just makes the VF page hang, needing to be manually closed (although the record is still saved).

Can someone please assist?

Thanks!
Hi all, I have a Visualforce page form that goes out of format when the user is in Compact mode.
I've tried  <apex:form styleClass="slds-form-element_stacked"> but still does not work. When I turn on Developer Tools it goes into the right format, so it's hard to debug. Please can anyone assist?
Below is the full page code. Thank you in advance!

<apex:page standardController="Contact" extensions="CRM_Contact_Address_Ext" lightningStylesheets="true" > 

    <script>
    function setFocusOnLoad() {
        document.getElementById('{!$Component.pb1.ps1.sl1}').focus();
    }
    window.onload=setFocusOnLoad;
    </script>
    
    <style>
        .dateFormat 
        {
          display: none;
        }
        .requiredText
        {
          display: none;
        }
        .requiredExample
        {
          display: none;
        }
        .pbSubsection
        {
          margin-top:2%;
          margin-bottom:2%;
        }
    </style>
    
    <style type="text/css">
        .clearErrMsg{
            color:red !important;
            background:none !important;
            border-color: red  !important;
            }
    </style>
             
    <apex:pagemessages />


      <apex:form styleClass="slds-form-element_stacked">
        <apex:sectionHeader title="Address" subtitle="{!Contact.Name} Addresses"/>
        <apex:actionFunction action="{!toggleAddress}" name="toggleAddress" immediate="true"/>   
        <apex:pageBlock mode="edit" id="pb1" html-class="slds-form-element slds-form-element_stacked" >
            <apex:pageBlockSection columns="2" id="ps1" html-class="slds-form-element slds-form-element_stacked"  >
                
                <apex:selectList id="sl1" value="{!addressChoice}" multiselect="false" size="1" label="Please select which address you are adding:"  onchange="toggleAddress()">
                    <apex:selectOptions value="{!choiceList}"></apex:selectOptions>
                </apex:selectList>  

                <apex:selectList value="{!addressType}" multiselect="false" size="1" label="Address Type">
                    <apex:selectOptions value="{!dynamicList}"></apex:selectOptions>
                 </apex:selectList>  
                 
            </apex:pageBlockSection>      
             <apex:pageBlockSection Id="AddressFinderBlock">
        
                <apex:pageBlockSection title="Primary Address" rendered="{!showPrimary}" >
                    <pca:AddressFinder record="{!con}"  address="CONTACTMAILING"/>  
                </apex:pageBlockSection>
    
                <apex:pageBlockSection title="Alternative Address" rendered="{!showAlternative}">
                    <pca:AddressFinder record="{!con}"  address="CONTACTOTHER"/>  
                </apex:pageBlockSection>  
             
              </apex:pageBlockSection>

            <style>
                    .color{color:red;}
             </style>  
                        
            <apex:pageBlockSection collapsible="true" columns="1"  rendered="{!ShowMsg}" >
               
                 <font color="##0000FF">
                  </font> 
                              
              <apex:pageBlockSectionItem >
                 <apex:outputText value="{!ValidationMsg1}" styleClass="color" style="float:left" rendered="{!ShowMsg1}"/>
              </apex:pageBlockSectionItem>
                 
              <apex:pageBlockSectionItem >
                 <apex:outputText value="{!ValidationMsg2}" styleClass="color" style="float:left" rendered="{!ShowMsg2}"/>
              </apex:pageBlockSectionItem>
              
              <apex:pageBlockSectionItem >
                 <apex:outputText value="{!ValidationMsg3}" styleClass="color" style="float:left" rendered="{!ShowMsg3}"/>
              </apex:pageBlockSectionItem>
                            
              <apex:commandButton value="Clear Message" styleClass="clearErrMsg" action="{!RefreshMsg}" />
              
            </apex:pageBlockSection>          
              
            <center style="margin-bottom:5%"> 
                <apex:commandButton value="Cancel" action="{!Cancel}"  />          
                <apex:commandButton value="Save" action="{!Save}" styleClass="slds-vf-button_brand" rendered="{!AddressFieldUpdateable}" />
            </center>              
        </apex:pageBlock>
     </apex:form>
</apex:page>

 
Hi! I'm returning the following page reference in a Save method in a controller extension for a VF page:

pageReference('/lightning/r/Account/' + [Account's Id] + '/view') 

which works fine in Standard navigation mode, redirecting to the detail page, but in Console mode it just makes the VF page hang, needing to be manually closed (although the record is still saved).

Can someone please assist?

Thanks!