Beginning Salesforce DX : Versatile and Resilient Salesforce Application Development
معرفی کتاب «Beginning Salesforce DX : Versatile and Resilient Salesforce Application Development» نوشتهٔ Rainey، Jenna و Ivan Harris، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2022. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Table of Contents 5 About the Author 13 About the Technical Reviewer 14 Foreword 15 Chapter 1: Introduction 17 Chapter Summary 20 Chapter 2: Environment Setup 21 Installing the Salesforce CLI 22 Installing the Java Development Kit 24 Installing Visual Studio Code 26 Installing the Salesforce Extensions for Visual Studio Code 28 Chapter Summary 31 Chapter 3: Concepts Overview 32 Salesforce CLI 33 Visual Studio Code 34 Salesforce DX Projects 39 Source Format Metadata 41 Scratch Orgs 42 Unlocked and 2GP Packages 43 Dev Hub 44 Namespaces 44 Chapter Summary 44 Chapter 4: Salesforce CLI 45 Anatomy of a CLI Command 46 Command-Line Help 48 The sfdx Application 50 Controlling the CLI 52 Runtime Configuration Values 56 Listing Runtime Configuration Values 58 Setting a Runtime Configuration Value 59 Reading Runtime Configuration Values 61 Clearing a Runtime Configuration Value 62 Environment Variables 63 File Parameters 65 Command-Line Parameters and Arguments 67 JSON Formatted Command Output 69 CLI Logging 72 Salesforce CLI Command Execution 73 Using a Terminal Application 74 Using the Visual Studio Code Integrated Terminal 75 Using the Visual Studio Code Command Palette 76 Using a Visual Studio Code Context Menu 76 Which Command Execution Method? 77 Chapter Summary 78 Chapter 5: Dev Hub 79 Creating a Trial Dev Hub Org 79 Enabling the Dev Hub 81 Enable Source Tracking for Sandboxes 82 Enabling Unlocked Packages and Second-Generation Managed Packages 83 Enabling Einstein Features 83 Adding Salesforce DX Users 84 Authorizing a Dev Hub Org 88 Authorizing a Global Scope Dev Hub Org 89 Authorizing a Local Scope Dev Hub Org 92 Authorizing a Global and Local Scope Dev Hub Org 94 API Limits 96 Chapter Summary 100 Chapter 6: Projects 101 This Chapter’s Commands 103 Project Directories and Files 103 Creating a Salesforce DX Project 105 Configuring Salesforce DX Projects 108 Chapter Summary 110 Chapter 7: Orgs 111 This Chapter’s Commands 112 This Chapter’s Project 113 Managing Scratch Orgs 113 Creating Scratch Orgs 114 Listing Authorized Orgs and Active Scratch Orgs 117 Displaying Detailed Org Information 120 Opening Scratch Orgs 123 Deleting Scratch Orgs 125 Configuring Scratch Orgs 127 Scratch Org Definition File 128 Scratch Org Edition 131 Scratch Org Features and Settings 133 Adding Sample Data 139 Viewing Scratch Orgs from a Dev Hub Org 140 Authorizing Non-scratch Orgs 143 Logging In to a Non-scratch Org 144 Logging Out of a Non-scratch Org 147 Managing Sandboxes 148 Creating Sandboxes 149 Checking Sandbox Creation Status 155 Cloning Sandboxes 160 Deleting Sandboxes 163 Chapter Summary 164 Chapter 8: Metadata 165 This Chapter’s Commands 166 This Chapter’s Project 167 Source Format vs. Metadata API Format 168 Metadata Synchronization Options 170 Synchronizing Source Format Metadata with Source-Tracked Orgs 173 Pulling Source Format Metadata from Source-Tracked Orgs 174 Pushing Source Format Metadata to Source-Tracked Orgs 179 Synchronizing Source Format Metadata with Non-source-Tracked Orgs 183 Retrieving Source Format Metadata from Non-source-Tracked Orgs 185 Deploying Source Format Metadata to Non-source-Tracked Orgs 195 Default Test Execution 205 Synchronous Deployment 206 Asynchronous Deployment 210 Excluding Source Format Files from Syncing and Converting 215 Ignoring Source Format Files 217 Ignoring Metadata Components 219 Synchronizing Metadata API Format Metadata with Source-Tracked and Non-source-Tracked Orgs 221 Retrieving Metadata API Format Metadata from Source-Tracked and Non-source-Tracked Orgs 222 Synchronous Retrieval 229 Asynchronous Retrieval 237 Deploying Metadata API Format Metadata to Source-Tracked and Non-source-Tracked Orgs 239 Synchronous Deployment 244 Asynchronous Deployment 249 Converting Between Metadata API Format and Source Format 253 Converting from Source Format to Metadata API Format 254 Converting from Metadata API Format to Source Format 265 Chapter Summary 269 Chapter 9: Version Control 271 Git, GitHub, and GitHub Desktop 272 Creating a GitHub Account 275 Installing Git 278 Setting Up Your Git Identity 279 Installing GitHub Desktop 280 Working with a New Salesforce DX Project 284 Creating a Remote GitHub Repository 284 This Chapter’s Project 286 Creating a Local Repository 286 The .gitignore File 287 Performing the Initial Add and Commit 289 Changing the Branch Name 291 Linking a Local and Hosted Remote Repository 291 Synchronizing Tracked Changes 292 Working with an Existing Salesforce DX Project 297 Example Git Workflow 298 Creating a Local Feature Branch 299 Creating a Lightning Web Component 300 Testing the Component in a Scratch Org 302 Adding the Component to the Git Staging Area 306 Committing the Component Changes 307 Pushing Changes from the Local to the Remote Repository 308 Creating a Pull Request 310 Merging Changes 311 Chapter Summary 314 Chapter 10: Test Users 315 This Chapter’s Commands 316 This Chapter’s Project 316 Creating Scratch Org Users 317 Assigning Permission Sets to Users 324 Generating User Passwords 330 Chapter Summary 333 Chapter 11: Test Data 334 This Chapter’s Commands 334 This Chapter’s Project 335 Executing SOQL Queries 336 Record CRUD Commands 339 Creating Records 340 Reading Records 342 Updating Records 346 Deleting Records 348 Bulk Data Commands 349 Bulk Upserting 350 Bulk Deleting 361 SObject Tree Commands 364 Creating Hierarchical Test Data 366 Export Command SOQL Queries 370 Exporting Without a Plan Definition File 371 Importing Without a Plan Definition File 378 Exporting with a Plan Definition File 380 Importing with a Plan Definition File 388 Chapter Summary 389 Chapter 12: Development 390 This Chapter’s Commands 391 This Chapter’s Project 392 Working with Apex Classes 392 Executing Anonymous Apex 393 Creating Apex Classes 396 Creating Apex Triggers 400 Accessing Debug Logs 402 Running Apex Tests 414 Working with Custom Metadata Types 424 Creating a Custom Metadata Type 426 Adding Custom Metadata Type Fields 428 Creating Custom Metadata Type Records 429 Working with Experience Cloud Sites 435 Adding Experience Cloud to a Scratch Org 435 Listing Experience Cloud Site Templates 437 Creating an Experience Cloud Site 438 Publishing an Experience Cloud Site 440 Working with Lightning Web Components 441 Creating a Lightning Web Component 442 Testing a Lightning Web Component 445 Running Jest Tests in Debug Mode 448 Running Jest Tests in Watch Mode 454 Working with Static Resources 456 Working with Visualforce 460 Creating a Visualforce Component 460 Creating a Visualforce Page 462 Chapter Summary 465 Untitled 458 Chapter 13: Package Development 466 This Chapter’s Commands 467 This Chapter’s Project 469 Prerequisites 470 Creating the Salesforce DX Project 470 Namespaces 474 Creating a Namespace Org 475 Registering a Namespace 476 Namespace Linking 478 Namespaced Scratch Orgs 481 Deployment Options 484 Application Development Models 487 Package Development Walk-Through 488 Package Directories 489 Creating Packages 493 Listing Packages 497 Updating Packages 498 Establishing Package Dependencies 499 Defining Package Ancestry 501 Creating Package Versions 505 Listing Package Version Creation Requests 514 Listing Package Versions 515 Displaying Package Version Details 517 Updating Package Versions 518 Installing the Package Versions 520 Listing Installed Package Versions 526 Promoting Package Versions 527 Uninstalling Package Versions 531 Deleting Packages and Package Versions 534 Chapter Summary 538 Book Summary and Resources 539 Trailblazer Community 539 Salesforce Events 540 Salesforce DX Product 541 Noteworthy Developments 542 Index 545 Refer to the practical guidance provided in this book to develop Salesforce custom applications in a more agile, collaborative, and resilient way using Salesforce Developer Experience (DX). You will learn how to use the Salesforce Command Line Interface (CLI) to simplify working with projects, metadata, data and orgs. The CLI integrates with your development tools of choice such as Visual Studio Code, and CI/CD tools to implement DevOps pipelines. Readers will also gain an understanding of the package development model, which improves application quality and maintainability by grouping metadata into highly cohesive, loosely coupled containers. Salesforce DX supports application development throughout the entire development lifecycle where a version control system, rather than a Salesforce org, is the source of truth. It became generally available in late 2017 and has now reached a stage of feature richness and stability that it is becoming more widely adopted. Beginning Salesforce DX provides development teams with practical, how-to examples of using Salesforce DX that go beyond the Salesforce documentation. Commands and their parameters are described, including any gotchas, and the outcome of the commands on a Salesforce org is explained. What You Will Learn • How to setup a Salesforce DX development environment • Understand the key Salesforce DX concepts and the Salesforce CLI • Work with Dev Hubs, projects, orgs, metadata and version control systems • Improve quality with test users and test data • Bootstrap pro-code development with templates • Apply Salesforce DX to an end-to-end package development project Who This Book Is For Internal teams developing custom Salesforce applications for an individual customer, or those creating commercial applications for distribution via the Salesforce AppExchange enterprise marketplace. All team disciplines will benefit from understanding and applying Salesforce DX, including pro-code, low-code and no-code developers, testers, release managers, DevOps engineers and administrators. A secondary audience includes those needing to understand key concepts when establishing or evolving an organisation’s application lifecycle management capability, such as capability leaders, architects, consultants and business analysts.
دانلود کتاب Beginning Salesforce DX : Versatile and Resilient Salesforce Application Development