Salesforce is built with security for Salesforce Administrators as the foundation for the entire service. This foundation includes both protection for your data
and applications, and the ability to implement your own security scheme to reflect the structure and needs of your organization.
The security features of Salesforce provide both strength and flexibility for Salesforce Administrators. However, protecting your data is a joint responsibility
between you and salesforce.com. The security features in Salesforce enable you to empower your users to do their jobs efficiently, while also limiting exposure of data to the users that need to act upon it. Implement security controls that you think are appropriate for the sensitivity of your data. Your data is protected from unauthorized access from outside your company, and you should also safeguard it from inappropriate usage by your users.
Need Salesforce administrator training or help for your implementation or customization? Check out OnPath Salesforce Administrator Services. We're Canadian Eh! http://www.onpath.com/salesforce-optimization-services
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based automated testing framework for web applications and it is robust, expressive, flexible, and reusable. This is Tellurium 0.6.0 User Guide.
Tellurium 0.7.0 is a major release and we have worked on this release for almost one year. We have closed over 200 issues and have included many interesting new features. To make it easier for people to get familiar with Tellurium, we prepared the reference document to cover almost everything you need to know about Tellurium. The reference document is about 280 pages including 14 chapters and appendices.
Salesforce is built with security for Salesforce Administrators as the foundation for the entire service. This foundation includes both protection for your data
and applications, and the ability to implement your own security scheme to reflect the structure and needs of your organization.
The security features of Salesforce provide both strength and flexibility for Salesforce Administrators. However, protecting your data is a joint responsibility
between you and salesforce.com. The security features in Salesforce enable you to empower your users to do their jobs efficiently, while also limiting exposure of data to the users that need to act upon it. Implement security controls that you think are appropriate for the sensitivity of your data. Your data is protected from unauthorized access from outside your company, and you should also safeguard it from inappropriate usage by your users.
Need Salesforce administrator training or help for your implementation or customization? Check out OnPath Salesforce Administrator Services. We're Canadian Eh! http://www.onpath.com/salesforce-optimization-services
The Tellurium Automated Testing Framework (Tellurium) is a UI module-based automated testing framework for web applications and it is robust, expressive, flexible, and reusable. This is Tellurium 0.6.0 User Guide.
Tellurium 0.7.0 is a major release and we have worked on this release for almost one year. We have closed over 200 issues and have included many interesting new features. To make it easier for people to get familiar with Tellurium, we prepared the reference document to cover almost everything you need to know about Tellurium. The reference document is about 280 pages including 14 chapters and appendices.
Trích nguồn Dell EMC . Chúng tôi gửi đến bạn thông số kỹ thuật PowerEdge RAID Controller S140 , giúp bạn setup và quản lý RAID thật dễ dàng và nhanh chóng
Dell EMC I Nhat Thien Minh JSC
Web:www.ntm.com.vn
IBM Features on Demand (FoD) is a new licensing procedure to enable features on System x, BladeCenter, and Flex System servers and components.Features on Demand enables you to buy the features that you need now with the ability to enhance your system later without costly hardware upgrades.This paper describes the processes involved with activating and installing the FoD upgrades. For more information on Pure Systems, visit http://ibm.co/18vDnp6.
Visit the official Scribd Channel of IBM India Smarter Computing at http://bit.ly/VwO86R to get access to more documents.
Schmuzzi is a software company that I founded specializing in content management software that allows subscribers to have a resume website deployed to their own domain name. Every Schmuzzi subscriber gets their own database and becomes the administrator on their own Schmuzzi resume website.
The idea behind Schmuzzi is to move much of the information that would normally come out later in an interview to the front of the process. Prospective employers and clients can perform extensive research on the Schmuzzi subscriber based on the information presented within the Schmuzzi website. This allows the Schmuzzi subscriber to market themselves in a manner similar to how corporations market their products and services. Essentially allowing the Schmuzzi subscriber to become a brand.
Imagine dividing a resume website into its functionality and its content. When a Schmuzzi website is deployed all of the functionality is already there. All a Schmuzzi subscriber then needs to do is customize the features that they want and add their content. Almost everything in Schmuzzi is database driven, and therefore highly customizable. No technical abilities are required on the part of the Schmuzzi subscriber.
Schmuzzi is an extension to employment or networking websites, as opposed to an alternative. A Schmuzzi subscriber can link their Schmuzzi website to any employment, or networking websites to which they happen to belong. Each Schmuzzi subscriber gets their own Schmuzzi instance deployed to their own domain name. This is considerable different from merely having a profile on an employment or networking website. The Schmuzzi subscriber has far more freedom and control. The entire Schmuzzi website revolves around the Schmuzzi subscriber.
The ultimate vision of Schmuzzi is to create a technology infrastructure that would allow people to come together in cooperative collaborative enterprise.
If you're looking to interact with your Salesforce data from other systems, but need something more complex than what's offered by the native Rest API, look no further than REST Apex. Join us as we take a look at the basics of defining your own custom APIs using Apex REST. The session will be packed with tips and tricks, and we'll cover everything involved in defining your first Apex REST service.
Trích nguồn Dell EMC . Chúng tôi gửi đến bạn thông số kỹ thuật PowerEdge RAID Controller S140 , giúp bạn setup và quản lý RAID thật dễ dàng và nhanh chóng
Dell EMC I Nhat Thien Minh JSC
Web:www.ntm.com.vn
IBM Features on Demand (FoD) is a new licensing procedure to enable features on System x, BladeCenter, and Flex System servers and components.Features on Demand enables you to buy the features that you need now with the ability to enhance your system later without costly hardware upgrades.This paper describes the processes involved with activating and installing the FoD upgrades. For more information on Pure Systems, visit http://ibm.co/18vDnp6.
Visit the official Scribd Channel of IBM India Smarter Computing at http://bit.ly/VwO86R to get access to more documents.
Schmuzzi is a software company that I founded specializing in content management software that allows subscribers to have a resume website deployed to their own domain name. Every Schmuzzi subscriber gets their own database and becomes the administrator on their own Schmuzzi resume website.
The idea behind Schmuzzi is to move much of the information that would normally come out later in an interview to the front of the process. Prospective employers and clients can perform extensive research on the Schmuzzi subscriber based on the information presented within the Schmuzzi website. This allows the Schmuzzi subscriber to market themselves in a manner similar to how corporations market their products and services. Essentially allowing the Schmuzzi subscriber to become a brand.
Imagine dividing a resume website into its functionality and its content. When a Schmuzzi website is deployed all of the functionality is already there. All a Schmuzzi subscriber then needs to do is customize the features that they want and add their content. Almost everything in Schmuzzi is database driven, and therefore highly customizable. No technical abilities are required on the part of the Schmuzzi subscriber.
Schmuzzi is an extension to employment or networking websites, as opposed to an alternative. A Schmuzzi subscriber can link their Schmuzzi website to any employment, or networking websites to which they happen to belong. Each Schmuzzi subscriber gets their own Schmuzzi instance deployed to their own domain name. This is considerable different from merely having a profile on an employment or networking website. The Schmuzzi subscriber has far more freedom and control. The entire Schmuzzi website revolves around the Schmuzzi subscriber.
The ultimate vision of Schmuzzi is to create a technology infrastructure that would allow people to come together in cooperative collaborative enterprise.
If you're looking to interact with your Salesforce data from other systems, but need something more complex than what's offered by the native Rest API, look no further than REST Apex. Join us as we take a look at the basics of defining your own custom APIs using Apex REST. The session will be packed with tips and tricks, and we'll cover everything involved in defining your first Apex REST service.
Using the Tooling API to Generate Apex SOAP Web Service ClientsDaniel Ballinger
Presentation from Dreamforce 2014 on using the Tooling API to create increased support for calling SOAP based web services using WSDLs to generate Apex.
Learn the benefits of using social authentication to log into your Salesforce org or community. During this session, you’ll become familiar with authentication nomenclature and understand the differences between being an identity provider vs. service provider. We’ll also show the mechanics to allow social sign-on for registration and user creation using Apex.
Cloud computing, also known as on-demand computing, is a kind of Internet-based computing, where shared resources,data and information are provided to computers and other devices on-demand. It is a model for enabling ubiquitous, on-demand access to a shared pool of configurable computing resources.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
3. Table of Contents
Table of Contents
Getting Started....................................................................................................................................1
Chapter 1: Introduction...............................................................................................................1
Introducing Apex...........................................................................................................................................................2
What is Apex?...............................................................................................................................................................2
When Should I Use Apex?............................................................................................................................................4
How Does Apex Work?................................................................................................................................................5
Developing Code in the Cloud......................................................................................................................................5
What's New?.................................................................................................................................................................6
Understanding Apex Core Concepts.............................................................................................................................7
Chapter 2: Apex Development Process.......................................................................................12
What is the Apex Development Process?....................................................................................................................13
Using a Developer or Sandbox Organization..............................................................................................................13
Learning Apex.............................................................................................................................................................15
Writing Apex Using Development Environments......................................................................................................16
Writing Tests..............................................................................................................................................................17
Deploying Apex to a Sandbox Organization...............................................................................................................18
Deploying Apex to a Salesforce Production Organization..........................................................................................18
Adding Apex Code to a Force.com AppExchange App..............................................................................................18
Chapter 3: Apex Quick Start......................................................................................................20
Writing Your First Apex Class and Trigger................................................................................................................20
Creating a Custom Object...............................................................................................................................20
Adding an Apex Class.....................................................................................................................................21
Adding an Apex Trigger..................................................................................................................................22
Adding a Test Class.........................................................................................................................................23
Deploying Components to Production............................................................................................................25
Writing Apex.....................................................................................................................................26
Chapter 4: Data Types and Variables..........................................................................................26
Data Types..................................................................................................................................................................27
Primitive Data Types...................................................................................................................................................27
Collections...................................................................................................................................................................30
Lists.................................................................................................................................................................30
Sets..................................................................................................................................................................32
Maps................................................................................................................................................................33
Parameterized Typing......................................................................................................................................34
Enums.........................................................................................................................................................................34
Variables......................................................................................................................................................................36
Constants.....................................................................................................................................................................37
Expressions and Operators..........................................................................................................................................38
Understanding Expressions..............................................................................................................................38
i
4. Table of Contents
Understanding Expression Operators..............................................................................................................39
Understanding Operator Precedence...............................................................................................................45
Using Comments.............................................................................................................................................45
Assignment Statements...............................................................................................................................................45
Understanding Rules of Conversion............................................................................................................................47
Chapter 5: Control Flow Statements..........................................................................................49
Conditional (If-Else) Statements................................................................................................................................50
Loops...........................................................................................................................................................................50
Do-While Loops.............................................................................................................................................51
While Loops....................................................................................................................................................51
For Loops........................................................................................................................................................51
Chapter 6: Classes, Objects, and Interfaces.................................................................................54
Understanding Classes.................................................................................................................................................55
Apex Class Definition......................................................................................................................................55
Class Variables.................................................................................................................................................56
Class Methods.................................................................................................................................................56
Using Constructors..........................................................................................................................................59
Access Modifiers..............................................................................................................................................60
Static and Instance...........................................................................................................................................61
Apex Properties...............................................................................................................................................64
Extending a Class............................................................................................................................................66
Extended Class Example.................................................................................................................................68
Understanding Interfaces.............................................................................................................................................71
Custom Iterators..............................................................................................................................................72
Keywords.....................................................................................................................................................................74
Using the final Keyword..................................................................................................................................74
Using the instanceof Keyword.........................................................................................................................74
Using the super Keyword.................................................................................................................................75
Using the this Keyword...................................................................................................................................76
Using the transient Keyword...........................................................................................................................76
Using the with sharing or without sharing Keywords......................................................................................77
Annotations.................................................................................................................................................................78
Deprecated Annotation...................................................................................................................................79
Future Annotation...........................................................................................................................................79
IsTest Annotation............................................................................................................................................80
ReadOnly Annotation.....................................................................................................................................83
RemoteAction Annotation..............................................................................................................................83
TestVisible Annotation....................................................................................................................................84
Apex REST Annotations................................................................................................................................84
Classes and Casting.....................................................................................................................................................86
Classes and Collections....................................................................................................................................87
Collection Casting...........................................................................................................................................87
Differences Between Apex Classes and Java Classes...................................................................................................88
ii
5. Table of Contents
Class Definition Creation............................................................................................................................................89
Naming Conventions.......................................................................................................................................90
Name Shadowing.............................................................................................................................................90
Namespace Prefix........................................................................................................................................................91
Using the System Namespace..........................................................................................................................91
Namespace, Class, and Variable Name Precedence.........................................................................................92
Type Resolution and System Namespace for Types........................................................................................93
Apex Code Versions....................................................................................................................................................93
Setting the Salesforce API Version for Classes and Triggers..........................................................................94
Setting Package Versions for Apex Classes and Triggers................................................................................95
Lists of Custom Types and Sorting.............................................................................................................................95
Using Custom Types in Map Keys and Sets...............................................................................................................95
Chapter 7: Working with Data in Apex.......................................................................................98
sObject Types..............................................................................................................................................................99
Accessing sObject Fields................................................................................................................................100
Validating sObjects and Fields ......................................................................................................................101
Adding and Retrieving Data......................................................................................................................................101
DML.........................................................................................................................................................................102
DML Statements vs. Database Class Methods.............................................................................................102
DML Operations As Atomic Transactions...................................................................................................103
How DML Works.........................................................................................................................................103
DML Operations...........................................................................................................................................104
DML Exceptions and Error Handling..........................................................................................................114
More About DML........................................................................................................................................115
Locking Records............................................................................................................................................124
SOQL and SOSL Queries........................................................................................................................................125
Working with SOQL and SOSL Query Results...........................................................................................127
Accessing sObject Fields Through Relationships..........................................................................................127
Understanding Foreign Key and Parent-Child Relationship SOQL Queries...............................................129
Working with SOQL Aggregate Functions..................................................................................................129
Working with Very Large SOQL Queries....................................................................................................130
Using SOQL Queries That Return One Record...........................................................................................132
Improving Performance by Not Searching on Null Values............................................................................132
Working with Polymorphic Relationships in SOQL Queries.......................................................................133
Using Apex Variables in SOQL and SOSL Queries.....................................................................................134
Querying All Records with a SOQL Statement............................................................................................135
SOQL For Loops......................................................................................................................................................136
SOQL For Loops Versus Standard SOQL Queries......................................................................................136
SOQL For Loop Formats.............................................................................................................................136
sObject Collections....................................................................................................................................................138
Lists of sObjects.............................................................................................................................................138
Sorting Lists of sObjects................................................................................................................................139
Expanding sObject and List Expressions.......................................................................................................142
Sets of Objects...............................................................................................................................................142
iii
6. Table of Contents
Maps of sObjects...........................................................................................................................................143
Dynamic Apex...........................................................................................................................................................145
Understanding Apex Describe Information...................................................................................................145
Using Field Tokens........................................................................................................................................147
Understanding Describe Information Permissions........................................................................................148
Describing sObjects Using Schema Method.................................................................................................149
Describing Tabs Using Schema Methods......................................................................................................149
Accessing All sObjects...................................................................................................................................150
Accessing All Data Categories Associated with an sObject...........................................................................151
Dynamic SOQL............................................................................................................................................155
Dynamic SOSL.............................................................................................................................................156
Dynamic DML..............................................................................................................................................157
Apex Security and Sharing........................................................................................................................................159
Enforcing Sharing Rules................................................................................................................................159
Enforcing Object and Field Permissions.......................................................................................................161
Class Security.................................................................................................................................................162
Understanding Apex Managed Sharing.........................................................................................................162
Security Tips for Apex and Visualforce Development...................................................................................174
Custom Settings........................................................................................................................................................180
Ways to Invoke Apex........................................................................................................................182
Chapter 8: Invoking Apex........................................................................................................182
Anonymous Blocks....................................................................................................................................................183
Triggers.....................................................................................................................................................................184
Bulk Triggers.................................................................................................................................................185
Trigger Syntax...............................................................................................................................................185
Trigger Context Variables.............................................................................................................................186
Context Variable Considerations...................................................................................................................188
Common Bulk Trigger Idioms......................................................................................................................189
Defining Triggers..........................................................................................................................................190
Triggers and Merge Statements.....................................................................................................................192
Triggers and Recovered Records....................................................................................................................192
Triggers and Order of Execution...................................................................................................................193
Operations that Don't Invoke Triggers.........................................................................................................195
Entity and Field Considerations in Triggers.................................................................................................196
Trigger Exceptions........................................................................................................................................197
Trigger and Bulk Request Best Practices.......................................................................................................198
Asynchronous Apex...................................................................................................................................................199
Future Methods.............................................................................................................................................199
Apex Scheduler..............................................................................................................................................201
Batch Apex....................................................................................................................................................207
Web Services.............................................................................................................................................................218
Exposing Apex Methods as SOAP Web Services.........................................................................................218
Exposing Apex Classes as REST Web Services............................................................................................220
iv
7. Table of Contents
Apex Email Service....................................................................................................................................................229
Using the InboundEmail Object....................................................................................................................230
Visualforce Classes.....................................................................................................................................................231
Invoking Apex Using JavaScript................................................................................................................................232
JavaScript Remoting......................................................................................................................................232
Apex in AJAX................................................................................................................................................232
Chapter 9: Apex Transactions and Governor Limits..................................................................234
Apex Transactions.....................................................................................................................................................235
Understanding Execution Governors and Limits......................................................................................................236
Using Governor Limit Email Warnings....................................................................................................................242
Running Apex Within Governor Execution Limits..................................................................................................242
Chapter 10: Using Salesforce Features with Apex......................................................................245
Working with Chatter in Apex.................................................................................................................................246
Chatter in Apex Quick Start..........................................................................................................................247
Working with Feeds and Feed Items.............................................................................................................251
Using ConnectApi Input and Output Classes...............................................................................................256
Accessing ConnectApi Data in Communities and Portals............................................................................256
Understanding Limits for ConnectApi Classes.............................................................................................257
Serializing and Deserializing ConnectApi Obejcts........................................................................................257
ConnectApi Versioning and Equality Checking...........................................................................................257
Casting ConnectApi Objects.........................................................................................................................258
Wildcards.......................................................................................................................................................258
Testing ConnectApi Code.............................................................................................................................259
Differences Between ConnectApi Classes and Other Apex Classes..............................................................260
Approval Processing..................................................................................................................................................261
Apex Approval Processing Example..............................................................................................................262
Outbound Email........................................................................................................................................................262
Inbound Email...........................................................................................................................................................265
Knowledge Management...........................................................................................................................................265
Publisher Actions.......................................................................................................................................................265
Force.com Sites..........................................................................................................................................................266
Rewriting URLs for Force.com Sites.........................................................................................................................266
Support Classes..........................................................................................................................................................272
Visual Workflow........................................................................................................................................................273
Passing Data to a Flow Using the Process.Plugin Interface......................................................................................274
Implementing the Process.Plugin Interface...................................................................................................274
Using the Process.PluginRequest Class.........................................................................................................276
Using the Process.PluginResult Class............................................................................................................276
Using the Process.PluginDescribeResult Class..............................................................................................277
Process.Plugin Data Type Conversions.........................................................................................................279
Sample Process.Plugin Implementation for Lead Conversion.......................................................................279
Communities.............................................................................................................................................................284
Zones.........................................................................................................................................................................285
v
8. Table of Contents
Chapter 11: Integration and Apex Utilities................................................................................286
Invoking Callouts Using Apex...................................................................................................................................287
Adding Remote Site Settings........................................................................................................................287
SOAP Services: Defining a Class from a WSDL Document........................................................................287
Invoking HTTP Callouts..............................................................................................................................299
Using Certificates..........................................................................................................................................306
Callout Limits and Limitations.....................................................................................................................308
JSON Support...........................................................................................................................................................309
Roundtrip Serialization and Deserialization..................................................................................................310
JSON Generator............................................................................................................................................312
JSON Parsing................................................................................................................................................313
XML Support............................................................................................................................................................315
Reading and Writing XML Using Streams...................................................................................................315
Reading and Writing XML Using the DOM...............................................................................................318
Securing Your Data...................................................................................................................................................321
Encoding Your Data..................................................................................................................................................323
Using Patterns and Matchers.....................................................................................................................................323
Using Regions................................................................................................................................................325
Using Match Operations...............................................................................................................................325
Using Bounds................................................................................................................................................325
Understanding Capturing Groups.................................................................................................................326
Pattern and Matcher Example.......................................................................................................................326
Finishing Touches............................................................................................................................328
Chapter 12: Debugging Apex...................................................................................................328
Understanding the Debug Log..................................................................................................................................329
Working with Logs in the Developer Console..............................................................................................333
Debugging Apex API Calls...........................................................................................................................341
Exceptions in Apex....................................................................................................................................................342
Exception Statements....................................................................................................................................343
Exception Handling Example........................................................................................................................344
Built-In Exceptions and Common Methods.................................................................................................346
Catching Different Exception Types.............................................................................................................349
Creating Custom Exceptions.........................................................................................................................350
Chapter 13: Testing Apex.........................................................................................................354
Understanding Testing in Apex.................................................................................................................................355
What to Test in Apex................................................................................................................................................355
What are Apex Unit Tests?.......................................................................................................................................356
Accessing Private Test Class Members..........................................................................................................358
Understanding Test Data..........................................................................................................................................360
Isolation of Test Data from Organization Data in Unit Tests......................................................................360
Using the isTest(SeeAllData=true) Annotation.............................................................................................361
Loading Test Data.........................................................................................................................................363
vi
9. Table of Contents
Common Test Utility Classes for Test Data Creation..................................................................................364
Running Unit Test Methods.....................................................................................................................................365
Using the runAs Method...............................................................................................................................368
Using Limits, startTest, and stopTest...........................................................................................................369
Adding SOSL Queries to Unit Tests............................................................................................................370
Testing Best Practices................................................................................................................................................370
Testing Example........................................................................................................................................................371
Chapter 14: Deploying Apex....................................................................................................376
Using Change Sets To Deploy Apex.........................................................................................................................377
Using the Force.com IDE to Deploy Apex...............................................................................................................377
Using the Force.com Migration Tool........................................................................................................................377
Understanding deploy....................................................................................................................................379
Understanding retrieveCode..........................................................................................................................380
Understanding runTests()..............................................................................................................................382
Using SOAP API to Deploy Apex............................................................................................................................382
Chapter 15: Distributing Apex Using Managed Packages...........................................................383
What is a Package?....................................................................................................................................................384
Package Versions.......................................................................................................................................................384
Deprecating Apex......................................................................................................................................................384
Behavior in Package Versions....................................................................................................................................385
Versioning Apex Code Behavior....................................................................................................................385
Apex Code Items that Are Not Versioned....................................................................................................386
Testing Behavior in Package Versions...........................................................................................................386
Chapter 16: Reference.......................................................................................................................389
DML Operations..................................................................................................................................................................390
DML Statements......................................................................................................................................................390
Insert Statement.............................................................................................................................................390
Update Statement..........................................................................................................................................391
Upsert Statement...........................................................................................................................................391
Delete Statement...........................................................................................................................................392
Undelete Statement.......................................................................................................................................393
Merge Statement...........................................................................................................................................393
Bulk DML Exception Handling...................................................................................................................394
ApexPages Namespace..........................................................................................................................................................394
Action Class..............................................................................................................................................................395
Action Instance Methods..............................................................................................................................396
Component Class......................................................................................................................................................397
Dynamic Component Properties...................................................................................................................397
IdeaStandardController Class....................................................................................................................................398
IdeaStandardController Instance Methods....................................................................................................400
IdeaStandardSetController Class...............................................................................................................................400
IdeaStandardSetController Instance Methods...............................................................................................403
vii