Force.Com Platform Fundamentals an Introduction to Custom Application Development in the Cloud
Total Page:16
File Type:pdf, Size:1020Kb
Force.com Platform Fundamentals An Introduction to Custom Application Development in the Cloud Version 6 August 2011 By Phil Choi Chris McGuire Caroline Roth With contributions by Dave Carroll Nick Tran Andrea Leszek Ari Langer Force.com Platform Fundamentals © Copyright 2000-2011 salesforce.com, inc. All rights reserved. Salesforce.com is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. ISBN: 978-0-9789639-3-4 With special thanks to Grant Anderson, Steve Anderson, Dean Atchison, Sheri Bernard, Mysti Berry, Eric Bezar, James Bisso, Gina Blednyh, Michelle Chapman-Thurber, Leah Cutter, Steve Fisher, Carol Franger, Katia Hage, Ron Hess, Vincent Hurtel, Paul Kopacki, Sarah Marovich, Jon Mountjoy, Lauren Pederson, Vahn Phan, Kimberley Rathbun, Elizabeth Rice, Mary Scotton, Andrew Smith, Tom Tobin, Garen Torikian, Adam Torman, Andrew Waite, Joanne Ward, Sarah Whitlock, Clive Wong, and the Training & Certification team. Table of Contents Table of Contents Preface.............................................................................................1 Welcome to the Cloud!.........................................................................................1 Platforms for Cloud Computing...............................................................2 About This Book..................................................................................................2 Intended Audience....................................................................................3 Chapter Contents......................................................................................3 Choosing Your Development Environment..............................................5 Sending Feedback.....................................................................................5 About Developer Force.........................................................................................5 Salesforce.com Training & Certification...............................................................6 Chapter 2: Introducing the Force.com Platform.................................7 The Basics of an App's User Interface..................................................................8 Tabs...........................................................................................................8 Forms........................................................................................................8 Links.........................................................................................................8 The Benefits of a Force.com Platform App..........................................................9 Data-Centric Apps...................................................................................9 Collaborative Apps..................................................................................10 The Technologies Behind a Force.com Platform App........................................10 A Multitenant Architecture....................................................................11 A Metadata-Driven Development Model..............................................12 The Web Services API............................................................................13 Apex........................................................................................................14 Visualforce..............................................................................................14 Salesforce Mobile....................................................................................14 Sites.........................................................................................................15 The AppExchange Directory..................................................................16 Chapter 3: About the Sample Recruiting App..................................17 About Universal Containers................................................................................18 Considerations for the Recruiting App...............................................................18 i Table of Contents Building the App: Our Design...........................................................................19 Custom Objects......................................................................................19 Security and Sharing Rules.....................................................................20 Workflow and Approval Processes..........................................................20 Custom Reports and Dashboards...........................................................22 Visualforce..............................................................................................22 Chapter 4: Reviewing Database Concepts........................................23 What's a Database?.............................................................................................24 What's in a Database?.........................................................................................25 What's a Relational Database?............................................................................26 Summary of Database Concepts.........................................................................28 Chapter 5: Building a Simple App...................................................29 Becoming Familiar with the Setup Area.............................................................30 Introducing Apps................................................................................................31 Try It Out: Defining an App..................................................................32 Look at What We've Done.....................................................................34 Introducing Objects............................................................................................35 The Position Custom Object..................................................................35 Try It Out: Defining the Position Custom Object..................................35 Introducing Tabs.................................................................................................39 Try It Out: Defining the Positions Tab...................................................39 Look at What We've Done.....................................................................41 Becoming Familiar with Setup Detail Pages and Related Lists..........................43 Introducing Fields...............................................................................................45 Try It Out: Adding Text Fields...............................................................46 Try It Out: Adding Currency Fields.......................................................49 Try It Out: Adding Checkbox Fields......................................................49 Try It Out: Adding Date Fields..............................................................50 Look at What We've Done.................................................................................50 Chapter 6: Enhancing the Simple App with Advanced Fields, Data Validation, and Page Layouts......................................................53 Adding Advanced Fields.....................................................................................54 Introducing Picklists...............................................................................54 Try It Out: Adding Picklists...................................................................54 ii Table of Contents Introducing Field Dependencies.............................................................57 Try It Out: Creating a Dependent Picklist.............................................58 Look at What We've Done.....................................................................61 Introducing Custom Formula Fields.......................................................62 Calculating How Long a Position Has Been Open................................63 Try It Out: Defining a “Days Open” Custom Formula Field..................64 Try It Out: Giving Fields Dynamic Default Values................................68 Look at What We've Done.....................................................................69 Introducing Validation Rules..............................................................................69 Try It Out: Defining a Validation Rule for Min and Max Pay................70 Try It Out: Defining a Validation Rule for Close Date...........................72 Look at What We've Done.....................................................................74 Introducing Page Layouts...................................................................................76 Becoming Familiar with the Page Layout Editor....................................76 Try It Out: Grouping Fields into a New Section....................................78 Try It Out: Adding Spaces Between Fields.............................................80 Try It Out: Editing Field Properties.......................................................81 Look at What We've Done.....................................................................82 Chapter 7: Expanding the Simple App Using Relationships..............85 Introducing Relationships...................................................................................86 Introducing Relationship Custom Fields............................................................87