Visualforce & Lightning Experience

Similar documents
Lightning Knowledge Guide

AGENDA. DEX450: Programmatic Development Using Apex and Visualforce. Day One

Chatter Answers Implementation Guide

Chatter Answers Implementation Guide

Enhance Salesforce with Code

Salesforce Admin & Development Training

Siteforce Pilot: Best Practices

Salesforce DEV-501. Apex and Visualforce Controllers (DEV501)

In this project, you will create a showcase of your HTML projects and learn about links and embedding resources.

Document revision 1.0

RingCentral for Salesforce. Administrator Guide

PlayerLync Forms User Guide (MachForm)

Getting Started with the Aloha Community Template for Salesforce Identity

Getting started with Altmetric badges

Editing SEE Web Pages using Typo3

HTML TIPS FOR DESIGNING.

Visual Workflow Implementation Guide

Snap-Ins Chat. Salesforce, Summer

Snap-Ins Chat. Salesforce, Winter

Salesforce ldeas Implementation Guide

Open CTI Developer Guide

Visualforce Workbook

The Lightning Experience Guide

Using Dreamweaver CS6

Rockablepress.com Envato.com. Rockable Press 2010

Salesforce Console Implementation Guide

Guidelines for doing the short exercises

Dreamweaver CS6. Level 1. Topics Workspaces Basic HTML Basic CSS

In this project, you ll learn how to create your own webpage to tell a story, joke or poem. Think about the story you want to tell.

Dreamweaver Basics Workshop

Create and Manage Partner Portals

Salesforce Console Implementation Guide for Salesforce Classic

Force.com Sites Implementation Guide

RingCentral for Salesforce Classic. UK Administrator Guide

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

The Courier Mail has prepared the information in this document to assist with implementation of our RSS news feeds.

truechart Menubar Documentation HighCoordination GmbH Version 1.0.2,

HTML4 TUTORIAL PART 2

Google Sites Guide Nursing Student Portfolio

Dreamweaver CS5 Lab 4: Sprys

Visualforce Developer's Guide

Installation & Configuration Guide Enterprise/Unlimited Edition

The Lightning Experience Guide

Web AppBuilder for ArcGIS Dive Into Mobile Development. Yiwei Ma & Kevin Gao

Lightning Communities Developer Guide

Salesforce Console Implementation Guide

Snapshot Best Practices: Continuous Integration

WEBSITE INSTRUCTIONS. Table of Contents

SWCS 4.2 Backup Agent User s Guide Revision /20/2012 Solatech, Inc.

Microsoft Expression Web Quickstart Guide

MIGRATING FROM PORTALS TO COMMUNITIES

Salesforce.com Summer '10 Release Notes

TRAINING & CERTIFICATION. Salesforce.com Certified Force.com Developer Study Guide

SALESFORCE DMP SUPERTAG USER GUIDE 00. SuperTag User Guide VER. 2, UPDATED 1/16. Rights Reserved, Proprietary &

Techniques for Optimizing Reusable Content in LibGuides

SkyVisualEditor Salesforce1 Support Guide

Create, Customize & Send an

WEBSITE INSTRUCTIONS

Lab 1: Introducing HTML5 and CSS3

django-baton Documentation

Architectural Engineering Senior Thesis CPEP Webpage Guidelines and Instructions

Adobe Fireworks CS Essential Techniques

GRAPHIC WEB DESIGNER PROGRAM

Lesson 5 Introduction to Cascading Style Sheets

Visualforce Developer's Guide

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

PART 7. Formatting Pages

Convert Your JavaScript Buttons for Lightning Experience

Header. Article. Footer

Creating Effective School and PTA Websites. Sam Farnsworth Utah PTA Technology Specialist

Set Up and Manage Salesforce Communities

How To Get Your Word Document. Ready For Your Editor

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

JavaScript: Objects, BOM, and DOM CS 4640 Programming Languages for Web Applications

Visualforce Developer's Guide

HTML version of slides:

Advanced Dreamweaver CS6

Word Skills for ETD Preparation

HTTP Security Headers Explained

Integrating Facebook. Contents

AJAX Programming Overview. Introduction. Overview

BindTuning Installations Instructions, Setup Guide. Invent Setup Guide

Exploring SharePoint Designer

Customize Chatter Profile Pages with Profile Tabs

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

Lightning Communities Developer Guide

Salesforce App Admin Guide

Salesforce1 Mobile App Admin Guide

Viewports. Peter-Paul Koch CSS Day, 4 June 2014

RC Justified Gallery User guide for version 3.2.X. Last modified: 06/09/2016

Lesson 1 HTML Basics. The Creative Computer Lab. creativecomputerlab.com

How to Export Your Book as epub and Mobi file formats with Microsoft Word and Calibre

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

Force.com Sites Implementation Guide

FORMS. The Exciting World of Creating RSVPs and Gathering Information with Forms in ClickDimensions. Presented by: John Reamer

MPT Web Design. Week 1: Introduction to HTML and Web Design

MTAT Research Seminar in Cryptography The Security of Mozilla Firefox s Extensions

Creating Web Pages Using Netscape Composer AGENDA FOR THIS WORKSHOP. 1. How does it all work? 2. What do I need to get started at Fairfield?

Add Authentication to the Public Store Front

Transcription:

Visualforce & Lightning Experience Learn how to use Visualforce to customize your Lightning Experience. UNIT I Using Visualforce in Lightning Experience Using Visualforce in Lightning Experience. Lightning Experience brings an all new user interface to your Salesforce organization, but that doesn t mean your Visualforce apps stop working. Visualforce pages work in Lightning Experience, many without any revisions. Things have moved around, though, and there are some chores you ll want to complete to make sure your Visualforce pages work the way you expect as your users switch between Lightning Experience and Salesforce Classic. With some important exceptions, Visualforce just works in Lightning Experience. If you ve written Visualforce apps for your organization, you can expect that they work whether your users access them in Lightning Experience or Salesforce Classic. If you re Visualforce pages use the built-in standard components, their look-and-feel matches Salesforce Classic, whether your users access them in Lightning Experience or Salesforce Classic. If you want your pages to match the Lightning Experience styling, you have to do some work. As with Salesforce Classic, you can extend Lightning Experience with your custom Visualforce pages and apps, quick action can also use Visualforce in Lightning Experience. 1) Which of the following statements is NOT true: A) Visualforce pages display Salesforce Classic styling, even in Lightning Experience. B) All your Visualforce pages break in Lightning Experience until you fix them. C) Your Visualforce pages that use JavaScript might need some updates. 2) Where can you use Visualforce in Lightning Experience? A) In a custom app. B) In a custom tab. C) In a quick action.

UNIT II - Developing Visualforce Pages for Lightning Experience Developing Visualforce Pages for Lightning Experience The development process for creating Visualforce pages and apps for Lightning Experience is in some ways considerably different from developing for Salesforce Classic. In others, you ll find it s just the same. The main difference is how you view and test your pages during development. The one exception is the editor in the Visualforce Development Mode footer. If you ve enabled Development Mode in your user settings, and you re using Salesforce Classic, then viewing and editing Visualforce pages with the Development Mode footer is unchanged, as you d expect. If you switch to Lightning Experience, and then access a page using the traditional https://yourinstance.salesforce.com/apex/pagename URL pattern, you might be somewhat surprised to find yourself back in Salesforce Classic. If you need to test your pages in both Lightning Experience and Salesforce Classic is fairly obvious, but why can t you do that testing in the same browser, with the same user? In fact, you can and you should. Your users can toggle back and forth between the different user interfaces, and you should verify that your pages work when they do so. 1) Which of the following is NOT a recommended editing environment for Visualforce development in Lightning Experience? A) The Developer Console. B) The Setup editor. C) The Development Mode footer. D) Eclipse with the Force.com IDE.

2) Which of the following statements is true? A) You can see a Visualforce page in Lightning Experience in your browser by navigating to /apex/thepagename. B) You can see a Visualforce page in Lightning Experience in your browser by navigating to /one/one.app#/apex/thepagename. C) It's totally fine to postpone testing your Visualforce pages until late in the development process. D) You can't adequately test your Visualforce for Lightning Experience pages using just one desktop browser. UNIT III - Exploring the Visualforce App Container The largest difference between Visualforce in Lightning Experience and Visualforce in Salesforce Classic is the environment it runs in. In Salesforce Classic, Visualforce owns the page, the request, the environment. Visualforce is the application container. But in Lightning Experience, Visualforce runs inside an iframe that s wrapped inside the larger Lightning Experience container. Practically the most common code pattern where you d want to do this kind of thing is to manipulate window.location to navigate to another page. Some of these changes are simple, and obvious once you think about them. For example, Visualforce pages that run in Lightning Experience always have the standard Salesforce Classic header and sidebar suppressed When JavaScript code is added to the visualforce page some difference will occur in lightning experience. 1) Which of the following statements is true: A) Setting window.location directly is fine to do in Salesforce Classic. B) You can't use window.postmessage to send messages from your Visualforce page's iframe to code running in Lightning Experience. C) Your Visualforce pages can access DOM elements of the Lightning Experience navigation items. D) The sforce.one JavaScript utility object is injected into your page in Salesforce Classic. 2) Which of the following are different when Visualforce pages are displayed in Lightning Experience: A) The stylesheets added to the Visualforce page. B) Clickjack settings for the Visualforce page. C) The JavaScript code added to the Visualforce page.

UNIT IV - Sharing Visualforce Pages between Classic and Lightning Experience Wherever possible, you create Visualforce pages that behave correctly whether they run in Salesforce Classic or Lightning Experience. The less code you write, the less code you have to test and maintain. The benefits in terms of reduced complexity in your organization s code and configuration are obvious. And there are a number of contexts, such as Visualforce overrides of standard actions, where you don t have a choice. $User.UIThemeDisplayed global variables to determine the current user experience context. You can use these variables in Visualforce expressions to adapt your pages to Lightning Experience, Salesforce Classic, and Salesforce1.Action overrides that use Visualforce always use the same page, no matter what the user experience context. An action override always uses the same page, whether you re running in Salesforce Classic, Lightning Experience, or Salesforce1. Making sure two separate pages look different but behave the same is a non-trivial problem. Use the UserInfo.getUiTheme() and UserInfo.getUiThemeDisplayed() system methods to determine the current user experience context in Apex code. You can use them when your controller action methods or properties need to behave differently in different contexts. Detecting the current user experience context in JavaScript code is important if you re using JavaScript heavily in your pages and apps. It s especially important for using the right technique to manage navigation in your JavaScript code. Although we don t recommend this technique, you can query for the current user s preferred user experience directly using SOQL. Querying for the user s Lightning Experience preference directly is discouraged. The result tells you what the user s current preference setting is, not what user experience actually is on their screen. 1) What is a good reason to write Visualforce pages that work in both Salesforce Classic and Lightning Experience? A) The less code you write, the less code you have to test and maintain. B) Action overrides that use Visualforce always use the same page, no matter what the user experience context. C) Making sure two separate pages look different but behave the same is a non-trivial problem. D) All of the above

2) Which of the following tells you the current user experience context when used in Visualforce markup: A) $User.UITheme B) $User.UIThemeDisplayed C) UserInfo.getUiTheme() D) UserInfo.getUiThemeDisplayed() E) None of the above 3) Which of the following tells you the current user experience context when used in a JavaScript static resource: A) $User.UITheme B) $User.UIThemeDisplayed C) UserInfo.getUiTheme() D) UserInfo.getUiThemeDisplayed() E) None of the above 4) Which of the following tells you the current user experience context when used in Apex: A) $User.UITheme B) $User.UIThemeDisplayed C) UserInfo.getUiTheme() D) serinfo.getuithemedisplayed() E) None of the above 5) Why do we not recommend using SOQL to query for the user's preferred UX context: A) SOQL queries are not performant. B) The return value may not always match what the user is seeing on their browser. C) The user's preferred UX context is not available via SOQL. UNIT V - Managing Navigation Navigation in Lightning Experience The first thing we might mean by navigation is user interface elements on the screen. You click something, and something happens. For example, you click the Accounts item in the navigation menu, and you go to the Accounts object home page. You click the new button, and a record entry form appears. You choose a custom action from a quick actions menu, and you launch a custom process. And so on. Those buttons and menu items are navigation elements.

In Salesforce Classic, the following statement is NOT a supported way to navigate from the current page to another page. i.e. sforce.one.navigatetosobject(recordid). The following are supported ways to navigate from the current page to another page: 1) Return a PageReference object from an action method. 2) sforce.one.navigatetosobject(recordid). 3) Create a link using the expression {!URLFOR($Action.Contact.Edit, recordid)}. UNIT VI Understanding Important Visual Design Considerations Understanding Important Visual Design Considerations Visualforce pages look the same whether they are running in Salesforce Classic or Lightning Experience, unless you rework them to adapt to the appropriate user interface context. Built-in Visualforce components that display user interface elements aren t easily restyled to match the Lightning Experience look-and-feel. The following are true statements: 1) Visualforce pages for Lightning Experience from scratch, you should use the Lightning Design system. 2) By default, Visualforce components always use Salesforce Classic visual design. 3) The LDS includes CSS stylesheets, icons and fonts. Specifically, the HTML that s rendered by the built-in Visualforce components doesn t change when the page displays in Lightning Experience, and the Salesforce Classic stylesheets those components use is, by default, loaded by the page. Components that match the Salesforce Classic visual design, still match that visual design. You get a little slice of Salesforce Classic in the middle of your Lightning Experience. The Lightning Design System is the best way to add the Lightning Experience visual design to your pages.

1) Which of the following statements is true: A) Visualforce pages use the same visual styling in both Salesforce Classic and Lightning Experience. B) You can easily add a stylesheet specific to Lightning Experience to your Visualforce pages. C) The Lightning Design System is the best way to add the Lightning Experience visual design to your pages. 2) Which of the following statements is true: A) If you're creating new Visualforce pages for Lightning Experience from scratch, you should use the Lightning Design system. B) By default, built-in Visualforce components always use Salesforce Classic visual design. C) The Lightning Design System includes CSS stylesheets, icons and fonts. UNIT VII - Knowing Which Features to Avoid in Lightning Experience Knowing Which Features to Avoid in Lightning Experience There are a limited number of Visualforce components that we recommend you avoid on pages used in Lightning Experience. Additionally, a few features of Visualforce behave differently when used in Lightning Experience. Finally, there are a few places in Lightning Experience where you can t use Visualforce pages or apps, or where they might not function as expected. Lightning Experience is still evolving and growing. Visualforce pages always display with the standard Lightning Experience user interface when they run in Lightning Experience. As of the Spring '16 release, you can't customize the Lighting Experience Home page. There s no way to suppress or alter the Lightning Experience header or sidebar. In particular, the showheader and showsidebar attributes of <apex:page> have no effect on Visualforce pages when displayed in Lightning Experience. The sforce.one JavaScript utility object is available to Visualforce pages in both Salesforce1 and Lightning Experience. Visualforce overrides of standard actions are slightly different in Lightning Experience compared to Salesforce Classic. Any override for the object list action won t be accessible in Lightning Experience.

1) Which of the following statements is NOT true: A) You can set the title for a Visualforce page in Lightning Experience using the title attribute of the <apex:page> tag. B) You can't display the Salesforce Classic header or sidebar in Lightning Experience. C) The sforce.one object is available in both Lightning Experience and Salesforce1. D) You can't override the List action with a Visualforce page in Lightning Experience. 2) Which of the following statements is true: A) As of the Spring '16 release, you can't customize the Lighting Experience Home page. B) The <apex:relatedlist> tag displays all related lists in Lightning Experience. C) You can't use Visualforce in Lightning Experience.