Salesforce1 Mobile App Developer Guide

  • View
    220

  • Download
    3

Embed Size (px)

Text of Salesforce1 Mobile App Developer Guide

  • Salesforce App Developer Guide

    Version 11, Spring '18

    Written byDianne SieboldSamantha ReadyMichelle Chapman-Thurber

    With contributions byMichael AldereteCliff ArmstrongJay HurstDean MosesTammy RahnSamantha ReynardJim SinaiQuinton WallEmily Wilska

  • Discover both the declarative (point-and-click) and the programmatic (code-based)features of Salesforce. Learn how you can optimize existing features such asVisualforce pages and quick actions for the Salesforce mobile experience, as wewalk you through the process of making an existing organization mobile-ready.

    Salesforce App Developer Guide

    Copyright 20002018 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark ofsalesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks oftheir respective owners.

    Various trademarks held by their respective owners.

    No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, orby any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consentof the publisher.

  • CONTENTS

    Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Introducing the Salesforce Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Salesforce Platform Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Introducing the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Getting Around in the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4What about the Other Mobile Apps? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    Chapter 2: About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    Who Is This Book For? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12How Do I Begin? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12About the Sample Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12About Acme Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    Chapter 3: Setting Up Your Work Environment . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Install the Enhanced Warehouse Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Download Salesforce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    SALESFORCE APP ADMINISTRATION . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    Chapter 4: Configuring the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    Defining Which Users Can Use the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . 18About Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Try It Out: Enable Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19About Offline Access in the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Chapter 5: Customizing the Salesforce App Navigation Menu . . . . . . . . . . . . . 23

    About the Salesforce Navigation Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Try It Out: Configuring the Salesforce App Navigation Menu . . . . . . . . . . . . . . . . 26Test Out the Salesforce App Navigation Menu . . . . . . . . . . . . . . . . . . . . . . . . . 27

    How the Navigation Menu Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    Chapter 6: Customizing How Your Data Shows Up in the Salesforce App . . . . . 31

    How Page Layouts Work in the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

  • Rethinking Your Page Layouts for Mobile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Try It Out: Create a Custom Page Layout for the Mobile Technicians Profile . . . 35Test the Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    Tips for Optimizing Page Layouts for Mobile . . . . . . . . . . . . . . . . . . . . . . . . . . . 38About Compact Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    Try It Out: Create a Compact Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Test the Compact Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    Tell Me More: Compact Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    Chapter 7: Using Actions in the Salesforce App . . . . . . . . . . . . . . . . . . . . . . . . 45

    About Quick Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Action Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    Point and Click Your Way to Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Try It Out: Create an Object-Specific Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    Try It Out: Assign the Action to the Account Page Layout . . . . . . . . . . . . . . . 50About Global Quick Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Tell Me More: Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    About Action Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Try It Out: Customize an Object-Specific Action Layout . . . . . . . . . . . . . . . . . . . . 54

    Test Out the Object-Specific Quick Action . . . . . . . . . . . . . . . . . . . . . . . . . 55About Predefined Values in Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    Try It Out: Set a Predefined Field Value on an Action . . . . . . . . . . . . . . . . . . . . . . 58Test the Predefined Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    About Custom Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    Chapter 8: Guidelines and Best Practices for Administrators . . . . . . . . . . . . . . . 63

    Action Guidelines and Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Custom Icon Guidelines and Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    DEVELOPING FOR THE SALESFORCE APP . . . . . . . . . . . . . . . . . . . . . . . 67

    Chapter 9: Welcome to Salesforce Platform Development . . . . . . . . . . . . . . . . 67

    Our Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Who This Part is For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68When to Use Declarative vs. Programmatic Tools to Create Salesforce Apps . . . . . . . . . 68When to Use the Salesforce Platform vs. Creating Custom Apps . . . . . . . . . . . . . . . . . 69

    Contents

  • Salesforce Platform Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Development Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    Change the System Administrator Page Layout Assignment . . . . . . . . . . . . . . . . 72

    Chapter 10: Designing Mobile-First User Interfaces . . . . . . . . . . . . . . . . . . . . . . 73

    Design for Mobile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Keep Navigation Simple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Put Important Information at the Top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Minimize the Number of Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Use Field Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Minimize User Interface Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Tap Target Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    Chapter 11: Extending the Salesforce App with Visualforce Pages . . . . . . . . . . . 79

    Try It Out: Create a Visualforce Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Create a New Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Add the Tab to the Navigation Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Test the Visualforce Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

    Tell Me More: Where Visualforce Pages Can Appear in the Salesforce App . . . . . . . . . 86Tell Me More: About the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

    Chapter 12: Adding Functionality with Visualforce Custom Actions . . . . . . . . . . 93

    Custom Actions Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Try It Out: Create a Visualforce Custom Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    Add the Visualforce Custom Action to the Page Layout . . . . . . . . . . . . . . . . . . . . 95Test Out the Visualforce Custom Action . . . . . . . . . . .