Visualforce Tags not supported by Salesforce1
Why is this an issue?
The Salesforce mobile app does not support all Visualforce components. When your Visualforce page or component uses an unsupported tag, it will either fail to render or display incorrectly on mobile devices. This leads to a broken user experience for anyone accessing the page through the Salesforce mobile app.
The following tags are not supported in the Salesforce mobile app:
apex:detailapex:enhancedListapex:listViewsapex:inlineEditSupportapex:scontrolanalytics:reportChartapex:emailPublisherapex:flashapex:logCallPublisherapex:relatedListapex:sectionHeaderapex:selectListapex:tabPanelapex:tabapex:vote
Examples
Example of incorrect code:
<apex:page>
<apex:detail subject="{!account.Id}" relatedList="false" />
</apex:page>
<apex:page>
<apex:tabPanel>
<apex:tab label="Tab One">
<apex:relatedList list="Contacts" />
</apex:tab>
</apex:tabPanel>
</apex:page>
Example of correct code:
<apex:page>
<apex:form>
<apex:inputField value="{!Account.Name}" />
<apex:commandButton value="Save" action="{!save}" />
</apex:form>
</apex:page>
<apex:page>
<apex:pageBlock title="My Block">
<apex:pageBlockSection title="Section">
<apex:outputText value="Hello World" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
How can I fix violations?
Replace the unsupported tag with an alternative compatible with the Salesforce mobile app. For example:
Replace
apex:detailwith a custom layout usingapex:outputFieldorapex:pageBlockcomponents.Replace
apex:enhancedListandapex:listViewswith custom list implementations usingapex:pageBlockTableorapex:dataTable.Replace
apex:tabPanelandapex:tabwith a custom tabbed interface or restructure your page to avoid tabs.Replace
apex:relatedListwith a custom SOQL query andapex:pageBlockTableto display related records.Remove
apex:flashandapex:scontrolentirely, as they rely on technologies (Flash, S-Controls) that are deprecated.
If compatibility with the Salesforce mobile app is not required for a given page, you can dismiss the issue for that page.
When should I disable this rule?
You may want to dismiss this issue if your Visualforce page is only used in the Salesforce desktop experience and will never be accessed through the Salesforce mobile app. If you are certain the page is not exposed to mobile users, the unsupported tags will not cause any issues.
Resources
