Showing posts with label salesforce. Show all posts
Showing posts with label salesforce. Show all posts

Saturday 26 March 2016

New Trailhead Module – Navigating the Salesforce Advantage

16:16


It’s said that there’s a sales guy in everyone. However, there have been numerous instances during my career both as an employee and in my current role as the founder of a Salesforce consulting firm, where I’ve felt that this might not always be true! I’ve seen and experienced occasions where people have failed miserably to point out why Salesforce is so awesome. The recently released trail from Trailhead – Navigating the Salesforce Advantage is the best solution available out there for this problem. Why? Mainly because this module is not just for developers, admins and business users. It’s more focused toward those who are new to the platform or are wondering what all the hype about Salesforce and the cloud is. It’s the ultimate cheat sheet for your sales guy to pitch Salesforce to a client and win him over.

The new trail has four modules that are pretty light compared to what we usually see on Trailhead. It has around 2-4 units in each module and is 1hr 20min of your time well-spent.  While it’s always better if you go ahead and take the trail yourself, I hope this blog will show you just what you are missing by not doing so.

Module 1: Salesforce Success Model
Imagine this all-too familiar scenario!

            Curious Neighbor: So, what do you do for a living?
            Me: I work with Salesforce technology. I have my own consulting company.   
*Ahem, that felt good!*
            Curious Neighbor: Oh Sales! That must be tough. You do door-to-door selling?
            Me: …….
            Curious Neighbor: Sooo..got any freebies to spare?
Me:...................*sigh, this is gonna take some time*

The 2015 Forbes ranking of the World’s Most Innovative Companies featured Salesforce in the #2 position. This module gives you some reasons as to just how it got there. To quote from the module itself, “We became a leader in cloud computing because we knew that it had the power to make life better for our customers.” The company has always followed an unwavering ‘customer-first’ principle which has been the key to hundreds of thousands of successful customers today. If you know any of those people who have been living under a rock and have not heard of Salesforce.com (poor souls), then this is the module they should be looking at for enlightenment!

Module 2: Salesforce Cloud Benefits
Salesforce is generally perceived to be a CRM solution and of course, it is one. But, have you ever wondered whether it’s actually a platform or an app or just pure magic? Well, it’s a bit of all three! This module gives an answer to the question – What is Salesforce? – in easy-to-grasp terms. It also takes you through why the founders of Salesforce.com Marc Benioff and Parker Harriss took the seemingly crazy decision in the late 90’s to grow roots in cloud computing. Look where it’s got them now! Take that, critics!

Module 3: Salesforce Technology Basics
If you are in the Salesforce world, then multi-tenancy and metadata are household terms for you. But if you are new to our world, then this is one module that is sure to get you up to speed with these terms and how they are the building blocks of the platform. It touches upon nearly everything you need to know before you foray into Salesforce including a section that clears any lingering questions on when to configure and when to code. But what struck me here was that the module has been designed to talk technical, but manages to do it without actually sounding technical. It’s the simplest and easiest way to understand the basics of the Salesforce platform. Try it out and you’ll see what I mean!
Module 4: Salesforce Ecosystem
This module is focused on the Salesforce ecosystem which is a thriving community of developers, admins, partners, customers, user groups, developer groups – the list is endless. I’ve met with and interacted personally through user/dev groups and virtually through the Success Community with other Salesforce enthusiasts. And if that’s not all, Salesforce conducts an annual Dreamforce event which brings together all the amazing folks from the community in one place for a lot of fun and innovation. It’s the best time of the year and is one that I eagerly wait for every year! Each and every one of these networking options is covered in this module, so make sure you go through this as well.


If you’re wondering where to get started on Salesforce, then look no further. This is the perfect intro you can get to what it’s all about.  So just dive right in and blaze your own trail. And drop a comment below and let me know how it went!

Tuesday 26 August 2014

Top reasons why you should attend Dreamforce this year

15:06




  Here are some of the reasons why I think you should attend Dreamforce this year ...

Saturday 26 July 2014

Call Apex Class from Custom Button (Javascript) in Salesforce

05:34


Most of the times, we end up needing to do more complex logic, but from the simplicity of the custom button on the page layout. This post aims at giving you a running start to this.

Lets get straight into it, by this we're assuming you know how to





Monday 7 April 2014

Salesforce Files Sync , The dropbox for Salesforce

16:39


Finally the wait is over…. Salesforce Files Sync is here… Its kinda like the Dropbox for salesforce and in Spring ’14 you can get it on pilot. Well lets go over some neat features
  • It syncs your files automatically to salesforce… just drop it and forget it
  • The files are available on all the devices
  • if you’ve shared the file on a chatter post, if the latest version is uploaded it automatically points to the latest version
  • Sits right in well with the files tab in salesforce
  • Decide which files to be synced
  • Control this feature via profiles and Permissions set (Users need to have the “Sync Files” permission)




How do I get it ?

Well as of spring ’14 You’ll need to contact salesforce support to enable this feature for you by raising a ticket.

Once its enabled for your ORG, make sure you give the “Sync Files” Permission to all those who need it. 

You can download the application from  : Your Name | My Settings | Desktop Add-Ons | Salesforce Files.

Limits 

Maximum Files folder size : 5GB
Maximum file size : 500 MB

Leave your thoughts in the comments

Read more about it : http://docs.releasenotes.salesforce.com/en-us/spring14/release-notes/rn_chatter_files.htm

Sunday 17 November 2013

Best Practices for writing Apex Test classes in Salesforce

15:26


Here are some best practices that I felt need to be followed while writing test classes in Salesforce , Do add your thoughts too


Monday 28 October 2013

Freeze Users In Salesforce

13:41
What is Freezing User mean ?

We all know what deactivating a user in salesforce means : They will not be deleted from the system but will no longer be able to log in to Salesforce and their records can be transferred to another user.They cannot be part of workflows or part of any automated processes. Click here to read more on Deactivating users. Freezing a User is when you have to do some extra work to get the user deactivated.

e.g. If your ORG is one among the larger ones which uses a lot of automated process or has custom hierarchy fields then you may already know deactivating a user selected in a custom hierarchy field is not a one step process. So you can freeze the user account to ensure you've enough time clean up, transfer the records and then finally deactivate the user.

Wednesday 9 October 2013

Describe all the fields for all SObjects

13:58
In one of the requirements I came across, I needed to get the list of all the fields across all objects. I wanted to make sure that I did in the best possible way, But couldn't find any straight answers. So here's the code I came up with. Its simple and straight-forward and if you find a better way to do this let me know in the comments. Thank you

To start off, we need the list of SObjects that we are going to run this for. Ideally we should have the list of SObjects stored in a Custom setting, this is a one time thing and could be done using anonymous apex execution. Following is the code to do just that..

List<string> SObjectList = new List<string>();

for(Schema.SObjectType objTyp : Schema.getGlobalDescribe().Values()){
   String name = objTyp.getDescribe().getName();
   // Exclude all the unwanted Sobjects e.g. History, Share etc..

 if(!name.containsignorecase('history') && !name.containsignorecase('tag')&&
    !name.containsignorecase('share') && !name.containsignorecase('feed')){      
      SobjectList.add(name);
  }
   // Insert into your custom settings
  }
Now that we've got the entire list of SObjects, lets do a Global Describe. Before we move on there is a gotcha here, as you know there is a governor limit on the number of Describes in an execution context (As of Winter '14 its 100 in both asynchronous and Synchronous) . I'll go ahead and suggest that its best if you could either do it in multiple executions or use a limit to control the number of SObjects processed.

 
      SObjectFieldsMap = new Map<string,Set<string>> ();
      Map<String, Schema.SObjectType> GlobalDescribe = new Map<String, Schema.SObjectType>();
      // Get the Global Describe which contains details for all objects
      GlobalDescribe =Schema.getGlobalDescribe();

      // Now we loop through our pre-compiled list of SObjects and get the describes for it
      for(String sObj:SObjectList)
      {
       // Populate the Map, with Sobject => list of fields
       if(SObjectFieldsMap.get(Sobj)==null && GlobalDescribe.get(sObj)!=null)
        SObjectFieldsMap.put(sObj,new Set<string>());

        if(SObjectFieldsMap.get(sObj)!=null) // Some Objects may not have Describes 
        SObjectFieldsMap.get(sObj).addAll(GlobalDescribe.get(sObj).getDescribe().fields.getMap().keyset());
      }
      
Well thats pretty much it. Hope this helps, let me know if you need anymore clarifications on this or if you've got some thoughts on this. Happy Coding!

Monday 30 September 2013

REGEX in Salesforce

13:00
What is a RegEx?

Regular Expression in computing terms is a pattern that is used to search. It has its own syntax and semantics. To learn more on what RegEx is visit --> here
Great now we learnt what REGEX is, to build your own regex visit --> buildregex.com

So how does all this play in salesforce apex ? There are numerous use cases for using regex and checking patterns e.g. Checking if string is in Email Format.

There are 2 Major Classes to check if regex matches. Pattern Class and Matcher Class
in short, the pattern class is used to store a type of regex and once you have a pattern stored, We use the Matcher Class to identify if a specified string matches the pattern.

Here's the code for Matching String to Email pattern In salesforce

public static Boolean checkEmailFormat(String email) {
        String emailRegEx = '[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\*\\/\\=\\?\\^\\_\\+\\-\\`\\{\\|\\}\\~\'._%+-]+@[a-zA-Z0-9\\-.-]+\\.[a-zA-Z]+';
        Pattern MyPattern = Pattern.compile(emailRegex);
        Matcher MyMatcher = MyPattern.matcher(email);
        Boolean result = MyMatcher.matches();
        return result;
    }

This is a self explanatory code, the Pattern is first compiled and stored, then we check the "email" parameter matches the regex, the result (true/false) is returned to the calling method. Wanna learn more ? --> Check SFDC Documentation

Hope this helped  ! Let me know your thoughts or if there are some neat regex that you'd like to share in the comments . Happy Coding !

Wednesday 11 September 2013

Email Case Team Members on Case Comment

14:40

This is going to be a short blog for a requirement I came across, But didn't find any blogs out there addressing this. So lets get right to it, I need to notify all the case team members when a case comment is logged, be it contact, users etc.


Here's what we'll need


  • Trigger on Case Comment 
  • A Helper Class (To keep the trigger clean)
  • Test Class ( Don't forget to test your code)
To make things look clean we'll keep most of the code to the helper class,

Saturday 11 May 2013

<apex:actionStatus>

03:10
Action status is usually used to show the status of an Ajax Process to which it is related to. It can be as simple as showing text during the update to as fancy as greying out the page and showing a loading gif. your imagination (and HTML CSS skills) are the limits

Wednesday 24 April 2013

How to activate Summer ’13 Preview on sandbox

10:18
Summer 13The salesforce.com Summer ‘13 release is quickly approaching and soon you'll be able to take advantage of exciting new features and functionality! If you are a Force.com Sandbox customer, you have the opportunity to get early access to Summer ‘13 in your Sandbox and test new customization and features (the chance to get your feet wet) before your production organization is upgraded.




Tuesday 23 April 2013

Escalate Question to Case

18:11

AnswersThis is a very useful need at times requested by clients.  “Escalate Question to Case” / “Create Case from a question” / “Convert Question to case” in either customer portal , Partner portal, or any self serve portal.

In the answers portal, when we are required to Escalate the question to a case so that the executives can handle it. Salesforce provides this functionality internally but its a little tricky to turn it on and in this post I want to address this.

Tuesday 9 April 2013

Second Meetup in Cochin announced- Salesforce.com Kerala User Group

23:03



The Salesforce Kerala User Group- the official meeting point of Force.com enthusiasts in Kerala and around is thrilled to announce its second Meetup event to be held on April 11th, 2013 at the IMA Hall, Palarivattom, Cochin. A sequel to the Meetup in October which was the first of its kind in Kerala, the upcoming one has an agenda designed to take you a step higher. This is a great platform for any and every one of you with a link to the ‘cloud’ to get together and swap ideas, share your experiences and learn about exciting new trends in the market today.

Thursday 14 March 2013

Visualforce To Excel

02:11
In this short post I want to explain how we can generate an excel output from a VF page.  We already know to how to generate a PDF from VF page. (Read more to find out how). One of the common requirements is to convert a VF page with data into an Excel sheet, here are some things you may want to keep in mind
  1. Use a separate VF page for export. It is advisable to use a separate VF page to export off, reason being, usually the VF page in which data resides contains buttons, links images etc. and that is not something you usually want in your excel
  2. Use <apex:dataTable> : this gives you a consistent output and works for both windows and MAC. (Thank you Pratyush Kumar  for the Info)
  3. Proper validation : Before the export page is reached, make sure all validations to ensure data will be present is  a good practice

Thursday 31 January 2013

Spring ‘13 Release Rituals

11:50

The much awaited Spring ‘13 webinar was yesterday 30-JAN-2013. It was exciting and thanks to Pat Paterson(@metadaddy) and Samantha (@samantha_ready) for the amazing webinar presentation which covered the thrilling topics of spring 13 like
          • Tooling API, 
          • Connect in Apex,
          •  Canvas 
          •  Connected apps.

Wednesday 23 January 2013

Reload Standard Detail page from Inline VF

07:58
 
visualforceI just faced a small block, Pretty simple once you've figured it out, Thought of sharing it and saving time for us in the future. Most of the time we require to reload the Standard Page following an  action on the inline VF Page. The solution to this was not apparently available to me when I needed it. Usually after clicking on a link or button we need to refresh the standard (parent page) the VF page is in. Read more on how to add inline VF Pages

Problem: A VF page is inline on a standard detail Page, On click of button inside VF Page, Reload the standard Detail Page once action completes in the Inline VF page

Thursday 10 January 2013

How to write Batch Class in Salesforce.com Apex

10:00

batchApexIn order for us to write batch classes in apex, let us 1st understand what is batch class , when and where it should be used? This is an extensive blog going into details.
Main sections of this post are
  1. What is batch Apex
  2. When to use batch apex
  3. Advantages of using batch apex
  4. Batch Apex Governor limits
  5. Sample Code

Wednesday 9 January 2013

Lotus Notes Apps to Force.com

10:00

 

Why should I migrate from Lotus notes to Force.com?
Lotus notes was a  very popular application and was used widely for all types of business processes and was a mini ERP. Even now many of the medium to large corporations use lotus notes just because they cannot either find a good alternative or just don’t want to break things.
Today we can touch the tip of the iceberg and understand how to start the migration.
you can also read : Top 5 reasons to migrating from lotus notes to force.com
Still not convinced why you should migrate from lotus notes to force.com? check here






Tuesday 8 January 2013

Spring ‘13 Features Release Preview

01:09

spring13Salesforce.com Spring ‘13 is a debated release where some say there are not many features being released like the usual salesforce releases while some say that Spring ‘13 packs really good and needed features. I’ll let you be the judge of that.
All of what I can say is , it is exciting as we are all waiting to see what is packed in this release and can’t wait to get our hands on it. Below are the videos salesforce released on their YouTube channel some time ago.
you can also find the release notes here : http://shivd.me/Spring13Release
The Spring 13 Release Preview of all features : http://shivd.me/Spring13ReleasePreview
and you could join us for the webinar here: http://shivd.me/Spring13Webinar
You could sign up for the Pre-Release ORG here : http://bit.ly/getspring13

Sunday 6 January 2013

Run Batch Class Hourly

16:34
This is a use case that we all come across very often, Schedule a batch class every hour to clean up data or to send out batch emails to case team members (Which I’ll blog about later).
There are three main steps involved in this
  1. Write a Batch class with the required logic
  2. Write a Scheduled Apex which calls the above Batch Class
  3. Schedule the class from the developer console by executing anonymous apex