Practice simplifying object- and field-level security checks with new Spring ’19 in Apex code

updated challenge code

How to identify User Theme?

Use these variables to identify the CSS used to render Salesforce web pages to a user. Both variables return one of the following values.

  • Theme1—Obsolete Salesforce theme
  • Theme2—Salesforce Classic 2005 user interface theme
  • Theme3—Salesforce Classic 2010 user interface theme
  • Theme4d—Modern “Lightning Experience” Salesforce theme
  • Theme4t—Salesforce mobile app theme
  • Theme4u—Lightning Console theme
  • PortalDefault—Salesforce Customer Portal theme
  • Webstore—Salesforce AppExchange theme

Did you know?

2. The inner class will be the only thing that runs outside of sharing context, everything else will still be in sharing context.

APEX Code Snippets

Reading inline Query data in APEX



This example generates a JSON string in pretty print format by using the methods of the JSONGenerator class





Best Salesforce Google Chrome extensions


Salesforce Navigator

Best of its kind. with control-shift-space you can reach to many setup pages in salesforce. I would suggest must have by every architect. Logins

Too many salesforce username/passwords to remember. My favourite place to store all the logins. with one click I go to the org I want.


Salesforce Organizer

Salesforce Organizer better than Logins Extension. Intuitively adds your username/passwords to Organizer list whenever you try to login with a new salesforce username/password account

Salesforce Dev Tools

A powerful toolkit for Salesforce developer, includes Query Editor, Apex code, objects reference doc, ERDs generator, and others.Salesforce DevTools is a simple but powerful Salesforce developer chrome extension for doing the below things :

・Salesforce data modal (ERDs) generator.
・Easy export Objects Reference to Excel file.
・Display fields API name on Salesforce object detail page.
・Quick generate Apex code / SOQL.
・Quick access to new record page, list page and object setting page of any object.
・All Check / Select on profile edit page and field permissions edit page.


Salesforce Inspector

Productivity tools for Salesforce administrators and developers to inspect data and metadata directly from the Salesforce UI.

Extension to add a metadata layout on top of the standard Salesforce UI to improve the productivity and joy of Salesforce configuration, development, and integration work.

Do it with SOQL

Deleting User Trace Logs

If you go to User Debug Log, you may see many user trace logs created by a user. Deleting one at a time is time-consuming. An easy solution is to execute below SOQL in Developer console and deleting them ( you can select multiple rows and can delete in one shot )

Mass Delete Attachments

Though Data loader is one option to do it, you can also use Developer console Query editor to mass delete attachments ( execute the query with appropriate constraints and select the rows you want to delete and hit delete button )


Bulk Delete ApexLogs

Its very painful to use Salesforce provided ‘Delete All’ logs button as it on;t deletes log files displayed in that page. Quick way of deleting log files using SOQL is executing below SOQL in developer console and use ‘Delete’ button


Salesforce Certified Identity and Access Management – Spring ’18 Release Exam

An administrator resets a user password in Salesforce.

Which attribute will be updated with the “True” value in the Identity URL or UserInfo endpoint?

A. email_verified
B. password_updated
C. password_reset
D. active


Universal Containers (UC) uses Salesforce for all of its internal users. Recently UC started getting a lot of complaints from users regarding locked user accounts due to users not being able to reset their passwords.

What is the recommended solution a Salesforce adminisrator can follow to solve this problem?

A. Implement a third-party Identity Provider to centralize user management and authentication policies.
B. Modify password policies and set Password Expires to “Never Expires” so that users can log in without any interruption.
C. Configure social media authentication provider to allow users to log in via their social media credentials.
D. Enable two-factor authentication using Lightning Login to allow users to log in without their passwords.


Universal Containers uses Customer Community for its customers and wants to make sure that there is an extra layer of security to avoid unauthorized access.

What is the recommended way of enabling two-factor authentication for external users?

A. Update external user profile to allow users to verify their identity and avoid unauthorized access.
B. Use an AppExchange application to implement two-factor authentication for external users.
C. Use dynamic login on the customer community to allow customers to verify their identity.
D. Use custom login flows to implement two-factor authentication for external users.


Universal Containers (UC) uses an external website to allow its customers to perform self-service functions. The website doesn’t support autentication through SAML or OpenID Connect. UC has decided to impement Salesforce and authenticate its users via Salesforce.

What is the recommended solution to allow users to authenticate via Salesforce on the external website?

A. Configure a connected app in Salesforce and use username-password flow to allow customer to authenticate on the website.
B. Configure Salesforce as a Service Provider, and implement custom federation services using existing Identity Store.
C. Configure Customer Community identity providers, and use Embedded Login to allow customers to authenticate on the website using configured identity providers.
D. Migrate the website to Customer Community to allow a seamless experience and set existing passwords as their customer community user passwords.



Universal Containers (UC) uses Customer Community to allow its customers to register and perform self-service functions. Due to the growth of the business and the customer base, UC wants to deliver a different experience to its customers based on runtime circumstances.

What is the secure and recommended way of enabling this?

A. Develop Lightning components to deliver different experience to customers using their information stored in Salesforce.
B. Use custom login flows to deliver different experiences by extracting the source from the URL where the customer is visiting from.
C. Use an AppExchange product to customize the Customer Community login experience and deliver a personalized experience to customers
D. Enable dynamic login experience by adding expid request parameter in the client configuraiton SSO initialization URL.