Behold Yourself – Summer 17 is here to break legacy Visualforce Navigation code in Lightning Experience

In Summer 17, URLFOR method in Visualforce would not work in Lightning Experience if used directly. Even sforce.one API is not fully compatible.

You read it right. Its not Locker Service that may break your code, but Summer 17. If you have legacy Visualforce page, which needs to navigate to Lightning experience and URLFOR is used directly, then chances of getting below error are very high.

Salesforce Summer 17 - URLFOR Not working
Salesforce Summer 17 – URLFOR Not working

In above screenshot, I got MALFORMED_ID : malformed Id error in one of my Visualforce, where I needed to navigate to new Account record. Continue reading “Behold Yourself – Summer 17 is here to break legacy Visualforce Navigation code in Lightning Experience”

Salesforce Spring 17 release – My favorite features

List of my favorite features in Salesforce Spring 17

In this post, I would be only talking about Generally available (GA) features, excluding pilots and Beta. Saving those awesome features for suitable time to come. So, here are some of my favorite picks from Spring 17.

Composite Resource

Imagine we are doing REST API call from external system by creating Account first and then contact. In between if internet connection is gone or user closes browser and only Account created without contact ?  From Spring 17, we can reduce number of REST API calls made by combining them in single request. Advantage of this feature would be easier transaction management and API limit saving. You can have up to 25 subrequests in a single call. Up to 10 of these subrequests can be query operations, including Query, QueryAll, and “Query More” requests to obtain the next batch of query results. Continue reading “Salesforce Spring 17 release – My favorite features”

Salesforce Summer 16 – My favorite top 20 features

List of Salesforce Summer 16 features

Summer 16 is already in production and most of you already knows what’s there in pandora box. In this post, I will share my favorite 20 features of Summer 16 release.

Salesforce Summer 16
Salesforce Summer 16

1. Clone Sandbox (Pilot) : This feature is not yet generally available however worth mentioning. Till now, we could create Sandbox only from production, however Summer 16 gives us a way to create brand new sandbox from other existing sandbox instead of production.

2. New Trace Flags in Debug Log : Now we can add trace flags on Automated Process, User, Apex Trigger and Apex classes as well. Before this release, we could only add trace flag on user. This enhancement will give developers more control over what to display in debug log and overcome debug log size limit problems.

Salesforce Summer 16 new Debug logs

Continue reading “Salesforce Summer 16 – My favorite top 20 features”

Summer 16 – Process builder with multiple decision criteria

Summer 16 release of Salesforce brings festival of lights not only in its logo but to Process builder as well

Before going to this feature, lets try to outline problem first. Consider a situation where we need to create a task when lead  source is Email and send an email to owner if lead source is Email and company name as ABC.

If we try to solve it using process builder, very soon we will understand that it is not possible in one process builder. Process builder can have only one criteria with true and false condition. In previous process builder, we could either perform action if lead source is Email or lead source is Email and company ABC. There is no way to define new criteria which will run along with previous criteria as shown in below image.

Process Builder Before Summer 16 with Single descision criteria
Process Builder Before Summer 16 with Single decision criteria

Continue reading “Summer 16 – Process builder with multiple decision criteria”

Salesforce Winter 16 – Top features

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags , with 6 Comments on Salesforce Winter 16 – Top features

You can watch recording of my live stream channel as well to know more on Winter 16 features. Powerpoint presentation used in livestream can be accessed from here.

Salesforce Winter 16
Salesforce Winter 16

1. Object Manager

Objects are objects, even if they are standard or custom objects. Salesforce simplified navigation to access Objects, we can access it now from “Object Manager” menu in setup.

Object Manager - Salesforce Winter 16
Object Manager

2. Lightning App builder to edit record page layout (pilot)

“Lightning App builder” should be enabled first to use this feature. We can use lightning components developed in Org or from AppExchange and change new lightning layout by using intuitive, drag and drop page layout editor.

Lightning App builder - Record page edit - Salesforce Winter 16
Lightning App builder – Record page edit

3. Rollup Summary field limit increased from 10 to 25

4. Restricted Picklist (Pilot)

Using Apex , Dataloader or any other API , it is possible to save any other value than allowed value in picklist field.  This future will enforce data integrity and result in error if other than allowed value selected in DML operation.

Restricted Picklist - Salesforce Winter 16
Restricted Picklist

Continue reading “Salesforce Winter 16 – Top features”

Salesforce Spring 15 – some highlighted features

Download PDF version of release notes from here.

1. Import Account / Contact from 16 different sources (previously generic csv was only option to import).

Import Account Contact in Salesforce - 16 sources
Import Account / Contact in Salesforce – 16 sources

2. Salesforce Analytics Query language (SAQL)
We already know about SOQL and SOSL. This is new Query language for Analytics cloud to enable ad hoc analysis of data stored in dataset. This is still in pilot.

3. Enhanced version of “Notes”

In this release, Salesforce has released new version of notes, which has many advantages over old like Create Standalone Notes, Relate same notes to multiple records, include bullet or numbered list, search only on notes, Create tasks from notes, Report on notes.

To enable Notes – Build | Customize | Notes | Settings | Enable Notes.

Salesforce Spring 15 Notes
Salesforce Spring 15 Notes [Click to enlarge]
 As you can see in image3, new Notes can relate to multiple records. Continue reading “Salesforce Spring 15 – some highlighted features”

Send Email with Generated PDF as attachment from Trigger – before Winter 16

There may be scenario in Salesforce that you need to send a Visualforce page rendered as PDF as a part of Email Attachment. This will be very easy if you want to perform this using Controller or Extension class, we just have to call getContentAsPDF() method of PageReference class and use returned blob data as a attachment in Email.

Update – 21 Oct 2015 (Winter 16)

After Winter 16 release, this solution will not work as getContent() method is treated as callout and if we try to call it from Async Apex or Rest API in this case, it will not return pdf content.

This solution will only work for you if you have not enabled critical update “PageReference getContent() and getContentAsPDF() Methods Treated as Callouts” in your Salesforce organization.

Note : If this solution is not working for you then try this.

If we are talking about achieving same in Trigger then it would be problem. Trigger does not support getContent() method of PageReference class. If you are thinking to use getContent() in future call then again we are not lucky, because @future methods does not support it. Also Apex job doesn’t support this method.

Now, I hope you understood that in which situation we are 🙂

So, In this article, I am going to explain how to resolve this issue. Not exactly resolve but workaround for above problem.

Solution is very simple, We will expose apex method as a REST API. Code for sending email will be written in APEX based REST API and our Trigger will call this method asynchronously using @future annotation. Continue reading “Send Email with Generated PDF as attachment from Trigger – before Winter 16”

Salesforce Winter 14 – New Features

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags , , with 4 Comments on Salesforce Winter 14 – New Features
Salesforce Winter 14
Salesforce Winter 14

Major Area of Release:

  • Developer Console
  • Canvas
  • HTML5 Support in Visualforce
  • Deployment related features like improved deployment Monitoring
  • New Database methods to get records deleted , updated in specific time

Renaming

  • Service Cloud Console“ is renamed to “Salesforce Console for Service“
  • Configuration Only“ sandbox renamed to “Developer Pro“
  • Agent Configuration“ renamed to “Live Agent Configuration“

1. Add Report Charts in Detail Page Layout of Standard or Custom Object

Starting from Winter 14, Now we have one more option in Page Layout Editor, which is “Report Charts”. Instead of Visiting Dashboard and Report we can see chart right in Detail page of record.

Charts in Detail Page
Charts in Detail Page

Considerations:

  • You can have two report charts only per page.
  • Report chart can only be added from enhanced page layout and is not supported in mini Console or original page layout editor.

2. Get Report Data as JSON – Analytics API
This is REST based API which will return data of report as JSON. This will revolutionize the way we access and visualize Salesforce data.

3. Search Metadata
One of my favorite features is searching Metadata. We have Global search which will search any record. But what if you have more than 200 Workflow rules, Email templates and struggling to find out what you need? You must be thinking for search feature which can search your setup, and this feature is available from Winter 14. Continue reading “Salesforce Winter 14 – New Features”