CloudVandana
Share the Love......
salesforce summer 16

7 Salesforce Ideas we’ve all been waiting for, coming in Summer’16 Release

With Summer’16, the 50th Release, Salesforce delivers some awesome Ideas that have been pending in Salesforce IdeaExchange for quite some time now. Some are 2 years old, others even 5 years.

Now you will ask why did Salesforce took such a long time to implement these ideas. The thing is, an Idea like this, might look simple but there is a lot to think of and account for while implementing it.

Salesforce being a Multi-Tenant Architecture also needs to take care that the changes that have been made as part of implementing the idea doesn’t have any affect on existing functionality. Sometimes it requires changing the whole data model or introducing new objects altogether.

All this is not easy and given the Salesforce pledge of continuos innovation(Know more about Salesforce Four Core Differentiators) and coming out with a new release and new features every 4 months, I think Salesforce does deserve a break.

 

The 7 Ideas

1) Idea : Clone Sandboxes

https://success.salesforce.com/ideaView?id=08730000000JawvAAC

Now you can clone a Sandbox as well, yes you heard me right. Until now you could only clone a Production Org but now you can clone a Sandbox as well. This gives a lot of flexibility to developers in an Application Life Cycle.

Now they can pause the development in one Sandbox, clone that Sandbox and start working on a new feature separately. It’s like Forking in Git.

Production Orgs are still being upgraded. So you can test this feature in Salesforce Preview Enterprise Org. Go to Setup => Sandboxes. Sign up here if you don’t have one.

Click on New Sandbox button, in the Create From drop down, you can choose either Production or a Sandbox to clone the Sandbox from.

 

salesforce sandbox

 

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_deployment_sandbox_to_sandbox.htm

 

2) Idea : Change Record Owner in Salesforce1

https://success.salesforce.com/ideaView?id=08730000000kyOeAAI

Now your Sales Reps can delegate accounts, campaigns, cases, contacts, leads, opportunities, work orders, and custom objects to others when they are in the field via Salesforce1 Application. This is available in all versions of Salesforce1 App.

The new Change Owner action is accessible from the action bar. This appears only if the has permission to change ownership. And user being changed to have at least Read permission to the record.

 

change owner salesforce

 

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_mobile_s1_newfeat_change_owner.htm

 

3) Idea : Allow Upload/Associate file attachment when sending an email

https://success.salesforce.com/ideaView?id=08730000000BpSJAA0&sort=2

Yes, yes, yes this has been delivered, moreover, Email is now a full blown Standard Object in Salesforce, how cool is that.

 

email object salesforce

 

and a lot more pain points around Emails in Salesforce have been resolved. I got a little lazy in finding links to other ideas that are being solved here, forgive me 😛 But I will write a separate blog post to explore all those new awesome features. Watch this space.

Earlier if you sent out an email from Salesforce with an Attachment, you can’t see the attachment linked to the Email in Salesforce.

 

email salesforce

 

But now Email appears as a record with Attachment related list 🙂

 

outbound email salesforce

 

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_sales_productivity_email.htm

 

4) Idea : Link a single Contact to Multiple Accounts

https://success.salesforce.com/ideaView?id=08730000000BrBSAA0

This has been a big pain for Salesforce users and finally being sorted. Earlier if you had a particular contact to be associated with multiple Accounts for e.g. a doctor treating multiple patients, a vendor responsible for multiple accounts, you used to duplicate the contacts and associate to individual contacts. This created a lot of duplicate records and confusion for the Users.

Some of you used to go a step forward and create a junction object between Account and Contact to related multiple Contacts to an Account.

But now all this can be done OOTB(Out of the Box). So this is how it goes, every Contact needs to be associated with a Primary Account for sure, this is what is being referred to as a direct relationship.

Other Accounts that need to be associated with the Contact are represent indirect relationship. 

You also get 2 new related lists. Related Accounts related list on Contacts and Related Contacts related list on Accounts.

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_sales_shared_contacts.htm

 

5) Idea : Process Builder – Next Decision Box for True

https://success.salesforce.com/ideaView?id=08730000000oMuvAAE

This is recent Idea but packs a lot of power. Any enhancement to the already powerful Process Builder packs a lot of punch. Earlier, after a particular action is completed, it’s STOP for the process, nothing can be done after that.

 

process builder salesforce

 

But now you can choose what happens after your process executes a specific action group. Should the process stop, or should it continue evaluating the next criteria in the process.

 

process builder salesforce

 

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_forcecom_process_multiple_actions.htm

 

6) Idea : Automatically Get Geocodes for Addresses

http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_general_geocodes_aloha.htm

Now for some standard Address fields like

  • Billing Address on accounts
  • Shipping Address on accounts
  • Mailing Address on contacts
  • Address on leads

the GeoCodes are automatically added.

For e.g. if you add a value of One Market Street, San Francisco, CA 94105-5188, United States for the Billing Address field and save this Acccount.

The values for BillingLatitude, BillingLongitude, and BillingGeocodeAccuracy fields are automatically added. These fields are not visible in the Salesforce UI or record level but you can reference them via formula fields or Salesforce API.

You have to setup and enable something called Clean Rules in your org to get this working. In my preview org these were already setup.

So now instead of this

 

salesforce account address

 

You will see this

 

salesforce account address

 

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_general_geocodes_aloha.htm

 

7) Idea : Limit imported records to existing picklist values

https://success.salesforce.com/ideaView?id=08730000000BqgWAAS

Oh boy, this used to be such a pain. You see around 20 different values in a picklist drop down, but the last there were only 5-6 values. Yes the good ole days 😛

All this will be now history. A restricted picklist field enforces the integrity of picklist data by including only the values that you’ve defined. Your picklist data stays clean, because users can’t add erroneous or redundant values.

You can easily set a Picklist field as restricted picklist by editing a picklist field and checking this checkbox. (this checkbox needs to be checked manually in your upgraded Sandbox)

 

strict picklist salesforce

 

and when creating a new picklist field

 

restricted picklist

 

This option is remains always active and greyed out for global picklist definition.

Release Notes : http://docs.releasenotes.salesforce.com/en-us/summer16/release-notes/rn_forcecom_picklists_restricted_picklists_ga.htm

 

Bookmark the Summer16 tag. More blog posts on other awesome features in this release will follow.

 

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

[well type=””]
[jetpack_subscription_form]
[/well]
salesforce apex idioms

Common Salesforce Apex Idioms and Patterns : Part 1

In this series of blog posts I will try to list out the common Apex Idioms and Design Patterns that we all as Salesforce Developers need to use from time to time. We tend to google these idioms out or try to refer to Salesforce developer forums or stackexchange to find the right code idiom that we can use to solve our particular technical issue.

I will try to list out as many as possible in subsequent posts.

[table width =”100%” style =”” responsive =”false”] [table_head] [th_column]Index[/th_column] [/table_head] [table_body] [table_row] [row_column]Create a Map of Id to List of Ids[/row_column] [/table_row] [table_row] [row_column]Create Test User[/row_column] [/table_row] [table_row] [row_column]Get RecordtypeId without SOQL query[/row_column] [/table_row] [table_row] [row_column]Create Community Users[/row_column] [/table_row] [table_row] [row_column]Get fields from a FieldSet and use them in a SOQL query[/row_column] [/table_row] [table_row] [row_column]Describe Information of a sObject or Getting the attributes of a sObject[/row_column] [/table_row] [table_row] [row_column]Describe Information of a field or Getting the attributes of a field[/row_column] [/table_row]
[/table_body] [/table]
  1. Create a Map of Id to List of Ids

This is a common idiom used whenever you have multiple items which has further items associated with it. An example is shown here. Another good example would be Accounts and their Contacts.


2. Create Test User

This is another idiom which is mostly copied and pasted in test classes where you need to create a Test User to run the Test code in a particular user’s context. You should always do this as testing with different user contexts in test classes accounts for robust code and good coding practices.


3. Get RecordtypeId without SOQL query

In Summer 14 Release, the limits on Describe Calls were removed. Now it’s better to get RecordtypeId for an Object via describe call rather than wasting SOQL queries.


4. Create Community Users

This is something that used to get me running to stackexchange every time and again, until I finally came up with this code and saved it. There are a couple of nuances to creating multiple Community Users on the basis of Contacts in Apex like Alias, NickName, User fields. This particular Idiom will help you immensely whenever you need to create Community users either in a Trigger or Batch Class.

If you are a little confused with why the user creation code is future annotated, then check this out

Bypass MIXED_DML_OPERATION error


5. Get fields from a FieldSet and use them in a SOQL query

Sometimes you need to refer a FieldSet and its fields in a SOQL query. Here’s a short and simple code to do it.


6. Describe Information of a sObject or Getting the attributes of a sObject

The example here is for Account object but you can use any object


7. Describe Information of a field or Getting the attributes of a field

The example here is for Account Name field but you can use any field

 

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

[well type=””]
[jetpack_subscription_form]
[/well]
SalesforceSatuday

Successful New Delhi Salesforce DG Meetup and SalesforceSatuday Session

[URIS id=476]

 

The room lights were dimmed, presentation was up and running, attendees had taken their seats and seemed excited and the Presenter(Me, Atul Gupta) was nervous, excited and anxious.

Yes this is the story of 2nd New Delhi Salesforce DG Meetup and the 1st offline #SalesforceSaturday session. After having the Revival Meetup on 21st February, this Meetup was topped up with a #SalesforceSaturday session, Lightning Components Explained.

I would like to thank the whole New Delhi Developer Community to being a part of the Meetup and making it a success. You guys are Awesome !!

It was very generously hosted in Nagarro premises in Gurgaon. I would like to thank the whole CRM Team for being such enthusiastic about the Meetup and sponsoring it.

 

DSC_0351_1200x800

 

lightning components

 

Lightning Components was chosen as a topic as it’s still new to a lot of people and there is so much to be learned and understood about it. I thought this is a perfect topic to be presented and shared knowledge with the whole New Delhi Developer Community a.k.a Awesome Developers(that’s what we call ourselves) and indeed the New Delhi Salesforce Developer Community is full of awesome people.

New Delhi Salesforce DG Meetup and SalesforceSatuday

 

new delhi salesforce developer group

 

These guys picked on to the concepts pretty fast and I was being bombarded with pretty witty questions.

Here’s the presentation for Lightning Components Explained

 

[slideshare id=61388168&doc=lightningcomponentsexplained-160426194422]

 

Thank you all for the great feedback and coming out in scorching heat to attend the meetup. It was pretty cool of you.

 

new delhi salesforce dg

 

There were plans of conducting a Trailhead4All session as well but due to time constraint we couldn’t. I guess we will have a separate session just for Trailhead.

Next Meetup is planned on 22nd May. I will be sending out the invites and the Agenda for it pretty soon.

 

Join:

Meetup.com Group
http://bit.ly/1QMPNRj­

Twitter
http://bit.ly/20g2I0A­

New Delhi Salesforce DUG Success Community Group
http://sforce.co/1oc0lQA

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

[well type=””]
[jetpack_subscription_form]
[/well]
lightning components

Lightning Components Explained : #SalesforceSaturday

Here is the Presentation for the Lightning Components Explained  we had as part of the New Delhi Salesforce DG Meetup and #SalesforceSaturday session on 23rd April, 2016

 

[slideshare id=61388168&doc=lightningcomponentsexplained-160426194422]

 

Join:

Meetup.com Group
http://bit.ly/1QMPNRj­

Twitter
http://bit.ly/20g2I0A­

New Delhi Salesforce DUG Success Community Group
http://sforce.co/1oc0lQA

 

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

 

[well type=””]
[jetpack_subscription_form]
[/well]
package-builder-icon

CloudVandana Salesforce Tip#3: Create package.xml file on the fly

The package.xml pain

If you are a big fan of Force.com Migration Tool a.k.a Ant Migration Tool  like me then you know how cumbersome it is to create a package.xml file for it. Either you have been disciplined enough from the start that as you go along building/creating stuff in Salesforce, you note down their api names properly, otherwise you are in for a big task of getting the api names of the components that need to be deployed either manually or via Force.com IDE.

 

package.xml

 

Force.com IDE has been the only way(apart from manually creating the file) to create a package.xml or destructive.xml file so far. It is a great tool but we all know it takes it’s sweet time in creating one, especially if the number of components in your Salesforce org are high, Force.com IDE takes time to fetch them and show them to you to select the components you want and prepare a package.xml.

Plus, if you select all the components, it will just give you a package.xml with something like this, which is not at all useful.

Now you are curious, what do I mean that its been the only way so far, it’s still the only way right? No, I’ve discovered an awesome tool that will make your life much easier.

The Discovery

I would like to introduce you to the Package Builder. Another awesome tool in the series of awesome tools created by Ben Edwards. I think this guy sat down with a lot of Redbulls one night and built all these awesome tools off.

 

package-builder-icon

 

The User Guide

Now how come this tool will make your life easy?

Go to this URL https://packagebuilder.herokuapp.com and you will land up on this page

 

salesforce package builder

 

Choose the Environment type, either Production (for Production/Developer) or Sandbox and click the big orange button “LOGIN TO SALESFORCE WITH OAUTH”. This will take to the login page

 

salesforce login page

 

Put in the org’s credentials for which you want to create package.xml file. Now you are logged in and you can choose of the following options

 

salesforce package builder

 

All Components : if you the package.xml for all the components in the Org

Exclude Managed : package.xml with no managed packaged components

No Packaged Components : components from both managed and unmanaged packages will be skipped

Choose one and click on the button “GET COMPONENTS”

 

salesforce package builder

 

Depending on the number of components in your Salesforce org, it will take sometime and give you a package.xml of all the components in your org. Ain’t that sweet.

 

salesforce package builder

 

salesforce package builder

 

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

[well type=””]
[jetpack_subscription_form]
[/well]

 

 

Salesforce Certifications

Salesforce Certifications Explained : #SalesforceSaturday

Presentation

 

[slideshare id=60688626&doc=salesforcecertificationsexplained-160409100908]

Recording

 

Please Join:

Meetup.com Group
http://bit.ly/1QMPNRj­

Twitter
http://bit.ly/20g2I0A­

New Delhi Salesforce DUG Success Community Group
http://sforce.co/1oc0lQA

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss on any updates.

[well type=””]
[jetpack_subscription_form]
[/well]
salesforce workbench

How to Use Salesforce Workbench like a Pro : #SalesforceSaturday

Enjoy the Presentation and Session recording.

Presentation

[slideshare id=60386980&doc=howtouseworkbenchlikeapro-160402152648]


Recording

 

Please Join:

Meetup.com Group
http://bit.ly/1QMPNRj­

Twitter:
http://bit.ly/20g2I0A­

New Delhi Salesforce DUG Success Community Group
http://sforce.co/1oc0lQA

cloudvandana salesforce tip#2

CloudVandana Salesforce Tip#2: Enable Disable all Workflows, Validation Rules and More

Hi Awesome Admins and Developers. I’m back with more awesome tips to make your life easier.

Not so hypothetical scenario : You want to upload data into Salesforce, lots of data, may be for multiple objects. You started with Data Loader or Dataloader.io and got an error. Hmm….what you seem to be missing. Oh yes, you forgot to disable the Validation Rules.

Great, now that you have realized your mistake, deactivate all the Validation Rules for those Objects, you can start with the data load again. 2nd time, the data went smoothly, Congrats!! But it turns out that Salesforce has sent emails to all your clients and you found records created in the org that you never uploaded.

It’s a little too late but you realized that you forgot to deactivate Apex Triggers, Workflows and Process Flows(Lightning Process Builder) in your org. Perhaps you should consider creating a checklist for “Pre-Data load Steps”. 

Deactivating all the Triggers and Worflows? I know this is too much work but hey what needs to be done needs to be done.

Don’t worry, Ben Edwards is here for your rescue. He has created an awesome tool that will help you in quickly activating and deactivating your Org’s validation rules, workflows, Apex Triggers as well as Process Flows. It’s this cool. Let me walk you through how this tool works.

Just open your Salesforce Org you want to work on and go to Salesforce Switch application page in a new Tab. You will arrive on this page

cloudvandana salesforce tip#2

You can use the tool for both Production/Developer Org or Sandbox. Choose accordingly and click on LOGIN. It will login to your org using oAuth 2.0. You will arrive at the following page

cloudvandana salesforce tip#3

Click on “GET METADATA”. The tool will query the relevant metadata from the org and you will see a list of all the Workflows, Apex Triggers, Process Flows and Validation Rules.

cloudvandana salesforce tip#4

cloudvandana salesforce tip#5

Now you can easily Enable/Disable all the Components of a particular type for a particular object in one go using ENABLE ALL / DISABLE ALL. Or you can enable/disable them one by one using the ON / OFF switches.

Deploy whatever changes you have done for all the components using DEPLOY CHANGES  or rollback the changes you just did by ROLLBACK TO ORIGINAL

That’s it. Isn’t it easy to use. I just love this tool.

Stay tuned. More Tips to come. Please subscribe to this blog so you don’t miss any updates.

linkclump account

CloudVandana Salesforce Tip#1 : Open Multiple Links Simultaneously

Hello Salesforce Admins and Developers.  This is CloudVandana Salesorce Tip#1. I will be coming out with a new Tip every couple of days. These tips will help you all Awesome Salesforce Developers out there to become more Awesome.

Here’ a challenge for you. I hope you like challenges.

As part of a requirement you need to investigate these Account records and their data in a Salesforce org. What will you do?

 

cloudvandana salesforce tip

 

Either take an export of these records using data loader or workbench, then you will need the their Salesforce Ids. The best to go about it is to just open these records in the browser only and have a look at them.

Now you will have to click on each and every record one by one and open them in a new tab. This can become pretty cumbersome as the number of such records increase.

Let me know introduce you to your lifesaver in such situation Linkclump. This a 198 KB free chrome extension that will help you in opening multiple links  in one go. Just right click on your mouse and drag over all the links that you want to open.

 

cloudvandana salesforce tip

 

And you will every link is opened in a new tab

 

cloudvandana salesforce tip

 

You can download this extension here LinkClump. Also check out this extension’s options to tweak its settings like opening these links in new windows instead of tabs.

This is an attempt to make the life of my fellow Salesforce Admins and Developers easier. I will be back with more such Awesome Tips.

That’s all folks !!

 

debug logs

So you want to learn, How to use new Debug Logs (Winter’16)

 

Hardly new now I suppose. It’s been quite some time since the release of Winter’16 but due to the lack of some good articles on this subject, here it is for your (All the Awesome Salesforce Developers out there) eyes only.

After the Salesforce orgs got migrated to Winter’16, I was sweetly surprised with the change I saw in the Debug Log View specially in the upper section where I used to add users. Frankly I freaked out.

I was used to seeing this screen, but folks, it’s gone, now we will never be able to see this screen again and for good.

 

debug logs

 

I am sure you were suffering from the same frustration and irritation for so many years, where you had to add the user again and again, just after executing the code for a couple of times. Alright, I had 20 logs but c’mon that used to get finished even before I start testing my code.

Salesforce has finally listened to our plight and removed the 20 logs per user at a time limit.

Now the limit is still there but it’s a time limit rather than the number of logs. Let me take you through the rather confusing(only at first) interface of the new debug logs.

 

new debug logs

 

The lower section is not at all changed actually, but in the upper section instead of “Monitored Users” we have “Use Trace Flags” section, yes now instead of setting up users we will be setting up trace flags. You will find one trace flag already added for you by default.

A Trace Flag includes,

  • debug level
  • a start time
  • an end time
  • a log type

Log Types can be of 3 types:

  • DEVELOPER_LOG, logs your activities (logged in User)
  • USER_DEBUG, logs an individual user’s activities (any user you specify)
  • CLASS_TRACING, doesn’t generate logs, but overrides logging levels for the Apex Classes and Triggers you specify

Don’t get confused, we will be covering this in detail later. First let us understand how to set a trace flag for all these types. Now I’ve already specified what a trace flag consists of, you need to provide all this information in order to create a trace flag.

When you will click on the “New” on the debug log setup page, you will arrive at the following screen

 

debug logs

 

debug logs

 

The different components are,

Traced Entity, for whom or what you want to generate logs, you can choose one of the following

  • User
  • Apex Class
  • Apex Trigger

Now, for User you will see a trace flag added when you click on Save but for Class and Trigger you won’t see any trace flags. But you can see these trace flags via Developer Console (I know this is confusing, but that’s the way it is), We’ll come to Developer Console in a while.

Put a Start Date and Expiration Date, now the catch here is you can’t have the difference between these two dates more than 24 hours. This got me really confused at first, but the best way to go about this is to                                                        choose the Start Date and Expiration Date by clicking on the current date time shown to the field’s right side and then increasing the date of Expiration Date by 1, i.e.

Start Date = 3/2/2016 12:46 PM

Expiration Date = 3/3/2016 12:46 PM

Obviously, you can choose any number of hours of difference between the two dates, the default is 30 mins.

Debug Level, here you specify the filters that are used in the logs. Clicking on the magnifying glass will show you this pop up window

 

debug logs

 

Now this window won’t show any search term or records when it will open, but to search for the default Debug Level, SFDC_DevConsole you will have to search with “*”, just click on the “Go” button won’t help, I know this is another confusing thing, but we got this working right.

If you want a different set of Logging Levels, you can click on “New” button and you will see this screen in the same popup

 

debug logs

 

Specify the name and choose the Log Levels for each Log Category. Save and you have created a new Debug Level, which you can use for any number of trace flags you create. You can set up different Debug Levels with different Log levels to keep them handy for next time.

After you have created or selected a Debug Level, you can Save the trace flag and voila, it’s there. Now for the time duration you specified, you can log as many debug logs as you want without taking stress of running out of them and using them wisely if you are a lazy developer like me.

Not so fast Hot Shot!! There is still 50MB org wide limit with 2MB per log limit enforced. And the expiration time of 24 hours for the logs.

Now coming to Developer Console, you can setup the Trace Flags and Debug Levels here as well. Open the Developer Console as usual and go to Debug => Change Log Levels….

 

debug logs

 

 

debug logs

 

Here you can you can do everything that we did in Salesforce Setup i.e. add Trace Flags and create/modify Debug Levels. The Apex Class trace flag you are seeing in the screenshot in red has expired.

Now coming to why Apex Class and Apex Triggers don’t produce any debug logs. These trace flags are just there to specify the log levels for that particular Class and Trigger.

So if you want to see debug logs for a particular Class in Finest log level for any log category, you need to add 2 Trace Flags, one for the user running the class, other for the Apex Class in question.

That’s all folks.

———————————————————————————————————————————————-

This is the first article in the “So you want to learn” series guys. If you want to learn about something specific in Salesforce, please comment on this post. I will try to come back with an article on it.

1 2 3