1. @patlatus www.patlatus.wordpress.com
S A L E S F O R C E D E V E L O P M E N T T E A M L E A D
S A L E S F O R C E C E R T I F I E D F O R C E . C O M A D V A N C E D D E V E L O P E R
Bohdan Dovhan
Being Salesforce Jedi:
Salesforce Forbidden and Advanced Techniques
Headshot optional
2. Advanced techniques used by Salesforce Jedi
Screen scraping, URL hacking
Debugging gacks, Reverse engineering
Overview
3. Forbiddenor advancedtechniques
* Screenscraping: “Please Don’t ScreenScrape Visualforce!”
Screenscraping is the most fragile integration you can imagine.
If there is a better option, screenscraping should not beused
* Debugging gacks (internal Salesforce Errors): gack id ( stack trace id)
sometimes it is possible to fix the issue without Salesforce Support
* Reverse engineering of Managed Packageto workaround MP bugs
* URL hacking:prepopulating field values onstandard interface
* Salesforce UI Requests Automation
4. URL hacking:prepopulatingfield values
To createarbitrary recordfollow the url: /{SObject prefix}/e?
To populate standard fields: ?{standard field name}={value}
To populate custom non-lookup fields: ?{custom field id}={value}
To populate custom lookup field: ?CF{custom field id}_lkid={lookupId}&CF{custom field id}={lookup.Name}
5. URL hacking:easy FLS copy
1.Inspect request which is sent on FLS save on source field (which you want to copy FLS Settings from )
2. Replace field Id with the desired field id
3. Open that URL in browser
4. => PROFIT!
6. ScreenScrapingUse Case: Get TotalLicenses
1. No “good” way to obtain “TotalLicenses” on Salesforce User License
2. There is a pilot feature which is not available for APEX queries even when enabled, and client needs to ask
Salesforce to turn that feature and write complex logic to retrieve that field value
3. Instead, we can just screen scrape User Licenses page and transform it into custom object records.I
implemented this in a ULETAS Gamma managed package
4. Custom object records can be used for easy further integration, they are accessible through APEX queries
7.
8.
9.
10. Salesforce UIRequests Automation
Neversay never. Nothing is impossible for those whobelieve.
Evenif somepiece of functionality is not exposed through Standard Objects, Apex Queries, REST API, SOAP API, Metadata API,
Tooling API, Bulk API, it doesn’t mean that it is not possible to write integration on it.
Using combination of ScreenScraping,URL hacking, Requests Reverse Engineering it is possible to integrate ANY functionality
which is exposed through Salesforce UI.
Suchintegration won’t bereliable and will be the mostfragile integration you can everimagine,however, it exists at least if you
can’t achievethat by any other means.
11.
12. Salesforce UIRequests Automation:SmartS2S
If you are tired to perform some tasks manually, you can implement Salesforce UI Requests Automation using combination of
ScreenScraping, URL hacking, Requests Reverse Engineering.
Use case: reconnect S2S connection of sandboxes after monthly refresh.
1. Particular implementation for the currentclient (hardcoding templates there)
2. General implementation for arbitrary pair of source and destination connections
General integration I am goingto present as Smart S2S managed package
22. Now you should have deeper understanding of
how Salesforce works and how you can do
impossible things with Salesforce
You should also understand how you can
automatize some routine tasks in Salesforce
You can now use provided information to build
some unique application or integration
Summary