Summer'18 is here!

VisualForce Jul 4, 2018

Summer'18 is already here with lot more lightning features and lot more other enhancements. Below is the list of all major feaures released:

Lightning

Convert JavaScript Buttons to Lightning-Friendly Alternatives With the Lightning Experience Configuration Converter (GA)

You guys must be aware that classis JavaScript buttons create lot more nuisance when they run in Lightning. To tackle this scenario and promoting Lightning, Salesforce introduced Lightning Experience Configuration Converter to simple convert these buttons into point-and-click lighting alternatives.

With just a few clicks, it scans your org for simple JavaScript buttons, converts them into point-and-click alternatives, and then deploys everything right into your org.

PS : The Lightning Experience Configuration Converter is a standalone tool that lives outside of Salesforce. We recommend that you run it in a sandbox or Developer org first, then migrate your changes to your production org.

New URL Format for Lightning Experience and the Salesforce Mobile App

The new URL format is more readable, addressing the issue of being directed to an unexpected location when accessing Lightning Experience URLs before authenticating.

Object Home page

Previous format: https://<lightning.domain.com>/one/one.app/#/sObject/Account/home
New format: https://<lightning.domain.com>/lightning/o/Account/home

Record page

Previous format: https://<lightning.domain.com>/one/one.app#/sObject/006R000000245p1IAA/view
New format: https://<lightning.domain.com>/lightning/r/Opportunity/006R000000245p1IAA/view

Streamline Your List Views with Detailed Filters

You no longer have to switch to Salesforce Classic to use detailed list view filter criteria. Find important data in your list views with more detailed filters in Lightning Experience, and supercharge your workflow.

See Field Dependencies While Editing a Record Details Page

It’s now easy to view and update all dependent and controlling fields when editing a picklist or checkbox on a Record Details page.

Set Up Person Accounts in Lightning Experience

Set up person account page layouts, record types, and compact layouts without wasting time switching to Salesforce Classic.

Lightning Dialer

Call Monitoring

Improve your sales reps’ selling techniques with personalized coaching. Use Call Monitoring to identify strengths and weaknesses in your reps’ interactions, and then improve overall sales performance through coaching

Tailor Prerecorded Voicemail Messages for Different Types of Prospects

Sales reps can record multiple voicemail messages for different types of prospects, then “drop” (or send) the prerecorded messages to recipients’ voicemail boxes. Reps are no longer limited to a single voicemail drop recording. Less time leaving messages means more time selling.

Show Local Numbers When Calling Prospects

Increase the number of customers who engage with your team’s calls. Local Presence dynamically displays phone numbers with the same area code as the prospects your reps are calling, so more calls are answered. The phone numbers are dedicated to your org. When a prospective customer returns the call, Local Presence routes it to the rep who made the initial call.

Do More with Tasks from the List View

Reps can do much more with tasks now that they can see a list view. Built-in list view filters let reps find tasks quickly, columns are sortable, and reps can apply filters to narrow down what they see


Unify Contact, Lead, and User Merge Fields in Email Templates with a New Merge Language

Update Calendar Items by Dragging Them in Lightning Experience

Sales reps can quickly and easily reschedule meetings and update due dates by dragging meetings, tasks, and other time-sensitive records to new time slots. No more clicking through to record detail pages to update records on calendars. This feature supports superior accessibility options, so reps can drag items using a mouse or the Spacebar and arrow keys.

Salesforce Surveys

Tailor Survey Questions Based on Participant Responses

You no longer have to require participants to click through every survey question. Instead, use logic rules to present a participant a particular follow-up question based on the answer to a previous question. By adding logic rules, participants don’t have to wade through irrelevant questions, and you can gather more accurate data.

Copy a Survey

Copy a survey to replicate its questions and logic. When you copy a survey, it’s not associated to the original survey in the database. The copied survey gets a new survey record.

View a Contact’s Survey Invitations

When you look at a contact record, you can now see which surveys that contact has been invited to take. Previously, you couldn’t tell if a contact had been invited to take a survey. As a result, some contacts received survey invitations multiple times.

Development

Set Default Email Field Values with Apex in Lightning Experience

Increase the quality of your customer service and save your agents time with default values for case emails. You can even put logic behind those default values, like copying a manager when a case is escalated or applying a specific email template. If you already use the Apex QuickAction.QuickActionDefaultsHandler in Salesforce Classic, your code works as is, so you don’t have to rewrite it in Lightning Experience.

How to implement: Create an Apex class that uses the QuickAction.QuickActionDefaultsHandler interface. Specify your default email field values and logic in the class. Then in Setup, go to the Support Settings page. Select Enable Default Email Templates or the Default Handler for Email Action, and point to your new class.

global class EmailPublisherForHighPriorityCases implements QuickAction.QuickActionDefaultsHandler {
    // Empty constructor
    global EmailPublisherForHighPriorityCases() {
    }

    // The main interface method
    global void onInitDefaults(QuickAction.QuickActionDefaults[] defaults) {
        QuickAction.SendEmailQuickActionDefaults sendEmailDefaults = (QuickAction.SendEmailQuickActionDefaults)defaults.get(0);
        EmailMessage emailMessage = (EmailMessage)sendEmailDefaults.getTargetSObject(); 

        Case c = [SELECT CaseNumber, Priority FROM Case WHERE Id=:sendEmailDefaults.getContextId()];

        // If case severity is “High,” append “managers@acme.com” to the existing (and possibly blank) BCC field
        if (c.Priority != null && c.Priority.equals('High')) { // Priority is 'High'
            emailMessage.BccAddress = 'managers@acme.com';        
        }        
    } 
}

Enable Debug Mode for Only the Users Who Need It

When debugging Lightning component JavaScript code, enable debug mode only for the users who are actively debugging to not affect the performance of Salesforce for other users of your org. Salesforce is slower when running in debug mode. Now you can debug problems that appear in your production environment without worrying that other users will complain or even notice.

Changes in Locker Service - eval() Is Now Available

The eval() function is now available in Locker Service, even when Strict CSP is enabled. This addition improves support for third-party libraries that evaluate code dynamically.

Limitation: In Locker Service, eval() always works in the global scope of the namespace. The eval() function can’t access the local variables within the scope in which it’s called. Normally, eval() has two modes of execution. When you invoke eval() directly, it works in the local scope. When you invoke it via a reference, it works in the global scope. Locker Service supports only the latter.

Apply Lightning Experience Stylesheets to Visualforce Pages (Generally Available)

Style your Visualforce pages with the look of Lightning Experience when viewed in Lightning Experience or the Salesforce app. This attribute doesn’t change the styling when the page is viewed in Salesforce Classic.

To style your Visualforce page, set lightningStylesheets="true" in the apex:page tag.

Simplify Your Code with the Apex Switch Statement

Apex now provides a switch statement that tests whether an expression matches one of several values and branches accordingly.

switch on expression {
    when value1 {		// when block 1
        // code block 1
    }	
    when value2 {		// when block 2
        // code block 2
    }
    when value3 {		// when block 3
        // code block 3
    }
    when else {		  // when else block, optional
        // code block 4
    }
}

Get the Developer Name for Record Types More Easily

Schema.DescribeSObjectResult.getRecordTypeInfosByDeveloperName()
Schema.RecordTypeInfo.getDeveloperName()

The SOQL Count() Function Doesn’t Count (As Much) Toward Limits

Apex limits the total number of rows that you can retrieve with SOQL queries. We improved the way queries that contain the SOQL COUNT() and COUNT(fieldName) functions are counted toward this limit.

For example, consider the following query.

Integer countOfContacts = [SELECT COUNT() FROM Contact WHERE Account.Name = 'Edge Communications'];

Previously, the number of records matched by this query counted toward the limit. Now this query counts as only one query row toward the limit.

The following query uses the COUNT(fieldName) function. Previously, the number of rows returned counted toward the limit, but now this query counts as a single query row.

AggregateResult ar = [SELECT COUNT(AccountId) rowcount FROM Contact]; // Count contacts with an account only
Integer rowCount = (Integer)ar.get('rowcount');

If a query that uses the COUNT(fieldName) function contains a GROUP BY clause, only the number of resulting AggregateResult objects count toward the limit. For example, in the query in the following example, only one item per aggregated result is counted toward the limit.

List<AggregateResult> res = [SELECT COUNT(id) FROM Contact GROUP BY AccountId];
System.assertEquals(res.size(), Limits.getQueryRows());

Previously, all the records matched by this query counted toward the query row limit.

Clear Messages on Visualforce Pages While Testing

Use the new System.Test.clearApexPageMessages() method to clear the messages on a Visualforce page while executing Apex test methods

Opt Out of Collecting Code Coverage Information During Test Runs

Speed up Apex test runs by opting out of collecting code coverage information when you want faster feedback on pass or fail status rather than coverage data. When you opt out, no data about Apex test coverage is stored.

From Setup, search for Apex Test Execution. Choose Select Tests, and select Skip Code Coverage.
From the Developer Console, select Test | New Run | Settings | Skip Code Coverage.

Apex Code Size Limit Increased

The maximum amount of Apex code that you can use in an org has been doubled, from 3 MB to 6 MB.

Apex Exception Email Recipients Can Receive Process and Flow Error Emails

Previously, the Apex Exception Email page was used only for Apex exceptions. Now you can also use it for process and flow error emails.

Untangle Your Dependencies with MetadataComponentDependency Queries (Pilot)

Use the new Tooling API object MetadataComponentDependency to view the dependency relationships between the metadata components in your org.

$CustomMetadata Global Variable

$CustomMetadata is a global variable in validation rule formulas to dynamically reference custom metadata types using the syntax $CustomMetadata.type.record.field.

Update Multiple Validation Rules with Custom Metadata Type Records

With custom metadata type records available to reference in validation rules, you don't need to hard code values. Reference the records directly within the validation rules to avoid adding the same values to each rule. The ability to reference custom metadata type records helps subscriber orgs, too. Previously, when you added a validation rule to a managed package, a subscriber could not edit it. Now you can define the logic and leave customization to a subscriber

Store Larger Debug Logs with Changed Log Limit

We increased the size limit for debug logs from 2 MB per log to 5 MB. You can store up to 250 MB of debug logs at a time. System logs are now deleted automatically after 24 hours instead of after seven days. Monitoring logs are still saved for seven days.

General

Duplicate Management: Run Duplicate Jobs on Custom Objects

Duplicate jobs aren’t just for accounts, contacts, and leads anymore. You can now run jobs on the custom objects you’ve created to support your business processes. Field-by-field comparison and merging of records aren’t supported.

Create Macros That Insert Text at Your Cursor

Previously when creating a macro, you could only replace existing text or add information before or after the text. Now you can insert text at your cursor.

Enjoy Updated File Previews in Salesforce Classic

File previews in Salesforce Classic now load faster and render beautifully on high-resolution monitors. We’re bringing the elegant file preview experience you love in Lightning Experience to Salesforce Classic. You can preview your files in full screen without downloading them. And now that the previews use HTML5, you no longer need Adobe Flash Player.

Preview Quip Documents and Sheets

Preview Quip documents and sheets just like other file type previews. Previews are available on the Files Details page, from Files Home, from the Notes and Attachments component, and when you click an attached Quip document in a Chatter feed.

Make Users’ Personal Data Unusable by Salesforce at Their Request

When users no longer want their personal data recognized in Salesforce, you can permanently scramble it with the new System.UserManagement.obfuscateUser Apex method. However, be careful using this method. When you invoke the method for that user, the data becomes anonymous, and you can never recover it.