Hello everyone! Here's our new chapter of Salesforce journey! For your information, I have just recently passed my Salesforce Advanced Administrator Exam! Anyway, there will be my last exam for me to complete this year which is the Salesforce Platform Developer II Exam. The first chapter that we will get into is Salesforce Fundamentals which consists of 5% of total score in Salesforce Platform Developer II Exam. Without further ado, let's get into it!
NOTE: This post is written in July 2019 and content might be changed/updated overtime. The content is inspired by focusonforce.com.
Base System Object
Sharing Object
Apex Managed Sharing
allows dynamic sharing settings using Apex code.Apex Sharing Reasons
- available for custom objects onlyApex Sharing Recalculation
- available for custom objects only- NOTE: sharing policy is only available if the OWD for the object is Public Read Only or Private.
- API name for standard object is
Schema.StandardObjectShare
while custom object isSchema.CustomObject__Share
- Example of manual sharing record with manually created sharing reason:
public static void manualShareRecord(Id recordId, Id userId){
Custom_Object__Share customObjShare = new Custom_Object__Share();
customObjShare.ParentId = recordId;
customObjShare.UserOrGroupId = userId;
customObjShare.AccessLevel = 'Edit';
customObjShare.RowCause = Schema.Custom_Object__Share.RowCause.Share_with_Lead_Creator__c;
insert customObjShare;
}
public class JobSharing {
public static boolean manualShareRead(Id recordId, Id userOrGroupId){
// Create new sharing object for the custom object Job.
Job__Share jobShr = new Job__Share();
// Set the ID of record being shared.
jobShr.ParentId = recordId;
// Set the ID of user or group being granted access.
jobShr.UserOrGroupId = userOrGroupId;
// Set the access level.
jobShr.AccessLevel = 'Read';
// Set rowCause to 'manual' for manual sharing.
// This line can be omitted as 'manual' is the default value for sharing objects.
jobShr.RowCause = Schema.Job__Share.RowCause.Manual;
// Insert the sharing record and capture the save result.
// The false parameter allows for partial processing if multiple records passed
// into the operation.
Database.SaveResult sr = Database.insert(jobShr,false);
// Process the save results.
if(sr.isSuccess()){
// Indicates success
return true;
}
else {
// Get first save result error.
Database.Error err = sr.getErrors()[0];
// Check if the error is related to trival access level.
// Access level must be more permissive than the object's default.
// These sharing records are not required and thus an insert exception is acceptable.
if(err.getStatusCode() == StatusCode.FIELD_FILTER_VALIDATION_EXCEPTION &&
err.getMessage().contains('AccessLevel')){
// Indicates success.
return true;
}
else{
// Indicates failure.
return false;
}
}
}
}
History Object
StandardObjectHistory
CustomObject__History
- Custom objects and some standard objects are associated with history object that tracks changes to an record.
- NOTE:
feed tracking
(chatter post) is not the same asfield history tracking
. - Sample SOQL query:
SELECT CreatedDate, Field, NewValue, OldValue from RMA_Tracker__History
Metadata Object
Schema
class contains methods for getting metadata about objects.- Sample common usage:
Schema.getGlobalDescribe()
,Schema.describeSObjects(sObjectsType)
Metadata API
- Common API calls such as
deploy()
,retrieve()
,describeMetadata()
- Metadata API allows retrieve, deploy, create, update and delete actions.
- Metadata API can be accessed via
Force.com IDE
orForce.com Migration Tool
.
DescribeSObjectResult descObjInfo = null;
// retrieve list of all object descriptions
List<Schema.SObjectType> allObjs = Schema.getGlobalDescribe().values();
// loop through the list and print object name and type
for(Schema.SObjectType obj : allObjs){
descObjInfo = obj.getDescribe();
System.debug(descObjInfo.getName());
System.debug('Is Custom Object? ' + descObjInfo.isCustom());
}
CurrencyType Object (multi-currency only)
CurrencyType
object stores currencies used by an organization if multiple currencies have been enabled.- Sample SOQL query:
SELECT ConversionRate, DecimalPlaces, IsActive, IsCorporate, IsoCode FROM CurrencyType
- Objects containing
Currency
field types in a multi-currency organization will contain an additional field named Currency (API name: CurrencyIsoCode) which carries values such asEUR
,USD
and etc.
DatedConversionRate Object
DatedConversionRate
object stores dated exchange rates.- Sample SOQL query:
SELECT StartDate, NextStartDate, IsoCode, ConversionRate FROM DatedConversionRate ORDER BY StartDate ASC
Chatter Object
- Using namespace
ConnectApi
, also known as Chatter in Apex, provides methods to access Chatter data and functionality and making it available to display. - NOTE: Chatter in Apex methods execute in the context of current user, not in system mode!
Lightning Platform
- Renamed from
App Cloud
, it is Salesforce's native suite of tools for developing applications. - Lightning Platform supports following:
- Lightning
- Salesforce App
- Salesforce Connect (integrate with external database)
- Einstein (predictive analysis)
- Trailhead
- AppExchange
- Heroku Enterprise
Heroku
Heroku
platform is a fully managed PaaS (Platform as a Service) which means that servers, hardwares, and infrastructure are managed by Heroku while developers can focus on building applications.- It is a polygot platform that allows applications to be built, run and scaled in a similar manner across multiple open source programming languages and databases.
- Supported languages:
Ruby
,Java
,PHP
,Python
,Node
,Go
,Scala
, andClojure
. - Supported databases:
Postgres
database. Heroku Enterprise
is tightly integrated with Salesforce which makes it easy to access and display Salesforce data.
Heroku Postgres
- A managed SQL database provided by Heroku that any language with PostgreSQL driver can be used to access Heroku Postgres database.
- Multiple plans: hobby, standard, premium and enterprise.
- Performance Analytics - the visibility suite for Heroku Postgres that allows monitoring the performance of the database and diagnose potential problems.
Apache Kafka
- A distributed commit log for fast, fault-tolerant communications between producers and consumers using message based topics.
- Allows handling billions of events and millions of transactions as it is designed to move large volume of ephemeral data.
- It enables the design and implementation of architecture for use cases such as:
- Elastic Queuing - accept large volumes of inbound events without putting volatile scaling demands on downstream services, improving scaling, handling fluctuations in load, and general stability.
- Data Pipelines and Analytics - immutable event streams enable developers to build high parallel data pipelines for transforming and aggregating data, allowing much faster and more stable data pipelines.
- Microservice Coordination - applications that use microservice style architecture and Kafka for communication simplify design concerns, such as service discovery and interaction.
Kafka cluster
consists of number ofbrokers
, or instances of Kafka, which manage streams of messages/events in topics comprised of a number of partitions.Producer
is client which writes toKafka broker
, whileconsumer
is client which reads fromKafka broker
.
Heroku Dataclips
- Allows the result of SQL queries on Heroku Postgres database to be shared easily.
- Multiple plans: Hobby, Production-tier
- Query can be created on
dataclips.heroku.com
and the resulting URL can be shared with other people. - Dataclips can be viewed in browsers or downloaded in JSON, CSV, XML, or Excel format.
- Dataclips can be created from
Dataclips Dashboard
and all dataclips are secured through unique URLs. - Dataclips may return up to 100,000 rows.
- Orphaned dataclips associated with old databases can be recovered.
Heroku Connect
- An
addon
that is used to interact and synchronize data between a Salesforce organization and Heroku Postgres database. - Multiple plans: Demo, Enterprise, and Shield.
- Multiple
Heroku Connect
add-ons can be added to a single application which can be used to synchronize data from multiple organizations. - Configuration, monitoring, troubleshooting of mappings can be done in
Heroku Connect Dashboard
. - Methods for synchronizing data with Salesforce organization: standard polling and accelerated polling.
Heroku Dynos
- A collection of lightweight Linux containers that run Heroku application.
Heroku Dynos
can be added as additional processing power to scale application.-
- Types of dynos: Free, Hobby, Standard, Performance
- Three configuration types:
- Web - dynos of 'web' process type defined in Procfile.
- NOTE: More Web Dynos allow more concurrent HTTP requests higher traffic volumes
- Worker - dynos of any process type defined in Procfile (typically used for background jobs, queuing systems and times jobs)
- NOTE: An application can have multiple kinds of Worker Dynos!
- One-off - temporary dynos that can run detached or with their input/output attached to local terminal.
- Web - dynos of 'web' process type defined in Procfile.
- Dyno formation of an app changes once a web or worker dyno is started.
- Dyno manager keeps dynos running automatically.
Heroku Redis
Heroku Redis
is a in-memory key-value data store run by Heroku, that is provisioned and managed as add-ons.Heroku Redis
lets one gain greater visibility into performance, better manage the instances with a powerful CLI, and easily federate data withPostgres SQL
to gain business insights using familiar SQL tools.- It can be accessed from any language with a
Redis driver
. - A
Heroku Redis
instance can be provisioned by attaching it to an application via CLI. - NOTE: One
Heroku Redis
can be shared with multiple applications. - For apps with multiple
Heroku Redis
instances, the primary instance can be established. Heroku Redis
can be upgraded which copies data from one instance to another before the changeover.- Performance Analytics can be used to monitor the performance of Redis instance and diagnose potential problems.
Use cases of Heroku
- Used as public facing websites and API services
- Integrates with 3rd party add-on modules
- Connects different database platforms
- Acts as middleware or central hub for passing data between multiple services
- Development labs for experimenting new ideas and such
Fuel
- An integrated collection of platform technologies that allows creating digital marketing applications. It can be used to build upon, extend, and integrate with
Salesforce Marketing Cloud
. - Fuel components include both REST and SOAP API.
- Fuel REST API - used for Contacts, Journey Builder, Mobile Connect, Mobile Push, Campaigns and Triggered Sends (may also use SOAP).
- Webservice SOAP API - used for Tracking, Subscribers and Lists, Automations, Content, Triggered Sends (may also use REST), and most other email activities.
- Fuel SDKs are collections of libraries that use API to simplify integrations with
Marketing Cloud
, currently support for major programming languages and frameworks including Java, .NET, PHP, Node, Ruby and Python. - Fuel UX uses JavaScript to build apps that deeply integrate with
Marketing Cloud
. - Content Builder allows embedding content creation in
Marketing Cloud
or stand-alone app.
Use cases of Fuel
- An email application that can be programmatically exposed.
- Build custom Marketing Cloud applications to extend standard
Marketing Cloud
functionalities by integrating APIs.
This is just a quick introduction to Salesforce Fundamental. Enjoy and ride on next!
Post was published on , last updated on .
Like the content? Support the author by paypal.me!