New and Changed Apex Classes

These classes, methods, and interfaces are new or have changed in this release.

New Methods

The following existing classes have new methods.

Approval.ProcessSubmitRequest class:
getProcessDefinitionNameOrId()
Returns the developer name or ID of the process definition.
getSkipEntryCriteria()
If getProcessDefinitionNameOrId() returns a value other than null, getSkipEntryCriteria() determines whether to evaluate the entry criteria for the process (true) or not (false).
getSubmitterId()
Returns the user ID of the submitter requesting the approval record. The user must be one of the allowed submitters in the process definition setup.
setProcessDefinitionNameOrId(String)
Sets the developer name or ID of the process definition to be evaluated.
setSkipEntryCriteria(Boolean)
If the process definition name or ID is not null, setSkipEntryCriteria() determines whether to evaluate the entry criteria for the process (true) or not (false).
setSubmitterId(String)
Sets the user ID of the submitter requesting the approval record. The user must be one of the allowed submitters in the process definition setup. If you don’t set a submitter ID, the process uses the current user as the submitter.
Schema.DescribeFieldResult class:
getReferenceTargetField()
Returns the name of the custom field on the parent standard or custom object whose values are matched against the values of the child external object's indirect lookup relationship field. The match is done to determine which records are related to each other.
System.Limits class:
getQueueableJobs()
Returns the number of queueable jobs that have been added to the queue per transaction. A queueable job corresponds to a class that implements the Queueable interface.
getLimitQueueableJobs()
Returns the maximum number of queueable jobs that can be added to the queue per transaction. A queueable job corresponds to a class that implements the Queueable interface.
System.Network class:
getLoginUrl(String)
Returns the absolute URL of the login page used by the community.
getLogoutUrl(String)
Returns the absolute URL of the logout page used by the community.
getSelfRegUrl(String)
Returns the absolute URL of the self-registration page used by the community.
loadAllPackageDefaultNetworkDashboardSettings()
Maps the dashboards from the Communities Analytics package onto each community’s unconfigured dashboard settings. Returns the number of settings it configures.
System.System class:
enqueueJob(Object)
Adds a job to the Apex job queue that corresponds to the specified queueable class and returns the job ID.

Changed Methods

The following methods have changed.

instanceof keyword:
Versioned behavior change when instanceof is used with a null object
In Apex saved with API version 32.0 and later, instanceof returns false if the left operand is a null object. For example, the following sample returns false.
Object o = null;
Boolean result = o instanceof Account;
System.assertEquals(false, result);
In API version 31.0 and earlier, instanceof returns true in this case.

New Properties and Fields

The following existing classes have new properties.

InboundEmail.BinaryAttachment class:
headers
Any header values associated with the attachment. Examples of header names include Content-Type, Content-Transfer-Encoding, and Content-ID.
InboundEmail.TextAttachment class:
headers
Any header values associated with the attachment. Examples of header names include Content-Type, Content-Transfer-Encoding, and Content-ID.

The following existing classes have new constants.

System.Math class:
E
Returns the mathematical constant e, which is the base of natural logarithms.
PI
Returns the mathematical constant pi, which is the ratio of the circumference of a circle to its diameter.

New Classes

The following classes have been added.

Auth.AuthConfiguration Class
Contains methods for configuring the settings for users to log in to a community, or a custom domain created using My Domain, with an authentication provider, such as Facebook©.
getAuthConfig()
Returns the AuthConfig sObject, which represents the authentication options, for a community or custom domain that was created by using My Domain.
getAuthConfigProviders()
Returns the list of authentication providers configured for a community or custom domain.
getAuthProviders()
Returns the list of authentication providers available for a community or custom domain.
getAuthProviderSsoUrl(String, String, String)
Returns the single sign-on URL for a community or custom domain.
getBackgroundColor()
Returns the color for the background of the login page for a community.
getDefaultProfileForRegistration()
Returns the profile ID assigned to new community users.
getFooterText()
Returns the text at the bottom of the login page for a community.
getLogoUrl()
Returns the location of the icon image at the bottom of the login page for a community.
getSamlProviders()
Returns the list of SAML-based authentication providers available for a community or custom domain.
getSamlSsoUrl(String, String, String)
Returns the single sign-on URL for a community or custom domain.
getSelfRegistrationEnabled()
Indicates whether the current community allows new users to create their own account by filling out a registration form.
getSelfRegistrationUrl()
Returns the location of the self-registration page for new users to sign up for an account with a community.
getStartUrl()
Returns the page of a community or custom domain displayed after a user logs in.
getUsernamePasswordEnabled()
Indicates whether the current community is set to display a login form asking for a username and password. You can configure the community not to request a username and password if it is for unauthenticated users or users logging in with a third-party authentication provider.
Auth.CommunitiesUtil Class
Contains methods for getting information about a community user.
getLogoutUrl()
Returns the page to display after the current community user logs out.
getUserDisplayName()
Returns the current user’s community display name.
isGuestUser()
Indicates whether the current user isn’t logged in to the community and may need to be redirected to log in, if required.
isInternalUser()
Indicates whether the current user is logged in as a member of the parent Salesforce organization, such as an employee.
Auth.SessionManagement Class
Contains methods for customizing security levels, two-factor authentication, and trusted IP ranges for a current session.
getCurrentSession()
Returns a map of attributes for the current session.
getQrCode()
Returns a map containing a URL to a quick response (QR) code and a time-based one-time password (TOTP) shared secret to configure two-factor authentication apps or devices.
inOrgNetworkRange(String)
Indicates whether the given IP address is within the organization's trusted IP range according to the organization's Network Access settings.
isIpAllowedForProfile(String, String)
Indicates whether the given IP address is within the trusted IP range for the given profile.
setSessionLevel(Auth.SessionLevel)
Sets the user's current session security level.
validateTotpTokenForKey(String, String)
Indicates whether a given time-based one-time password (TOTP) code (token) is valid for the given shared key.
validateTotpTokenForUser(String)
Indicates whether a given time-based one-time password (TOTP) code (token) is valid for the current user.

New Interfaces

The following interfaces have been added.

System.Queueable interface:
execute(QueueableContext)
Executes the queueable job.
System.QueueableContext interface:
getJobId()
Returns the ID of the submitted job that uses the Queueable interface.