Skip to main content

Posts

New Salesforce Book - Apex Design Patterns

  Refer below links to purchase: Packt publications Amazon.com (US) Amazon.in (India) Amazon.co.uk (UK) I'm really excited to share that today my book (co-written with Jitendra Zaa ) has been published. Here are some personal insights A little history This particular topic was always in my head and coming from .Net background and having worked with lots of design patterns in MS development world. I first successfully used Factory design pattern with Apex in 2009, when all my team was scratching their head and (cursing me badly) for "overtly complicating" the code architecture. They were happy with creating 20-30 different VF pages, which I emphasized needs to be designed with the help of 4-5 VF pages, VF components and factory method pattern. Well, we were able to complete the whole stuff in time and deliver it flawlessly. It was then and similar instances later that I realized that a larger faction of Salesforce developers (back then) had very l...

Quick Tips: Un-clutter Report type list (hide report types)

Frankly, this is a pretty nifty feature I have just observed (never paid attention) and I thought that most of you like me, would have never looked into it. So, hereby sharing it. While implementing Salesforce, one of the key things we showcase to users is the ease with which users can create their own reports with point-and-click features. This is definitely a very important feature for end users as they get the power to create reports in minutes without having to wait for lengthy IT process. Vanilla Salesforce provides lots of report types out of the box as per below screenshot. However, it is quite common that client might not be using certain features of Salesforce and hence those report types are not being used at all. They just clutter the report type list unnecessarily. Salesforce provides a quick way to hide unwanted report types. Just, check the checkbox above "Select Report Types to Hide" and you can hide/ unhide report types. For e.g. we want to hide all...

Quick Tips: Consider this before moving to Lightning experience

With Dreamforce '15, everyone got ample view of Lightning framework and its benefits or rather "WOW" aspects. I'm equally excited to see a paramount change in Salesforce UX layer which is was much needed. With all the excitement and eagerness to understand and use Lightning we need to also understand the process to transition from Classic UI (current UI) to Lightning Experience, or it can be a rather painful and unsatisfactory experience. Firstly, we need to understand that it's a complete overhaul of User Experience and not mere CSS change. So, the way users interact with application or developers develop the application or architect designs the applications, changes significantly. Secondly, as of now Lightning Experience is not fully enabled for entire Salesforce and is to be done in phases which makes complete sense. You cannot expect users to learn new system overnight and hence a transition is much appreciated. Not to mention, this also gives user...

Quick Tips : Salesforce : 10 ways to develop application without coding

Hi all, as evident from the topic, I'm hereby sharing a small list of configuration options available within Salesforce using which a non-programmer can also develop functionalities within salesforce. The best part of using these features is that you save time, save development/ testing effort, deploy and manage it easily. Standard/ Custom Objects Objects a.k.a. table (for database junkies) a.k.a. entity are used to store data within Salesforce. We can use out of the box objects for e.g. Account, Contact, opportunity, lead etc. (along with their powerful features) or create our own custom objects to store required information for e.g. invoice, purchase orders etc. Custom fields As with any entity, you need to store its attribute, similarly in salesforce an object can have fields. Out of the box objects have standard fields. Additionally, custom fields can be added to standard and custom fields. Following are few special types of fields that can be added to enrich product...

Quick Tips: Custom security settings (When to use Salesforce Custom Permissions?)

How often did each one of us get into a situation where we have to create custom security rules? For e.g. Call center agents should not be able to give credits. Only Supervisors or Finance team can give credits Only Finance and Account Manager can generate invoice. And the most trivial way to achieve it is something like if(profileName == 'Supervisor || profileName == 'Finance'){      // business logic to give credits } else{     //throw error message } Now, one of the best ways to handle this is by using "Custom Permissions". It allows you to leverage Salesforce security infrastructure and loosely bind that to your custom logic. This helps in making your code scalable and robust. You'll learn that below. What are Custom Permissions? Custom Permissions was made GA in Summer '15 (ver 34.0). It is a unique way of creating a custom permission which is required/ to be used by your custom logic. For e.g. in above example, if we create ...

Quick Tips: Merge fields in Visualforce

As most of my colleagues know me, I have always struggled to remember fieldnames, action names and have hard time copying names of fields from Object detail page and put them onto a Visualforce page, while creating merge fields. I just wanted to share a small tip for all those who share my "struggle" and want to have an easy way to get around that. If you are an eclipse user, Force.com plugin comes up with a very handy tool. Following are the tips to use it:- Open visualforce page in eclipse Open right click menu Click on Force.com> Insert Merge Field Voilla, you have all the objects listed in left hand list and on selecting an object, their fields gets populated in right hand list (as shown below) Additionally, you can also lookup standard actions available by selecting "$Actions" in the left hand list and it would display a list of all actions available (as per screenshot below):- Hope this helps your visualforce development and don't m...

Sneak Peek: Encrypted Custom Fields

What? Alphanumeric fields which would contain data in encrypted form. Mostly to be used in case of government regulations, as they have processing overhead and certain limitations for e.g. these fields cannot be unique, indexed or have default values. Also, there is a limit of 175 characters. Where? Custom encrypted fields can be be used in various applications and can be displayed on page layouts and can be even included for validations via validation rules and apex code. Why? Certain business needs or government regulations require certain data to be stored in encrypted state and displayed in masked form. For e.g. Social security numbers or credit card numbers. Salesforce makes it easy to achieve it via Custom encrypted fields.  How? Custom encrypted fields can be created as just another custom field with type selected as " Text (Encrypted) ". Master Encryption key key to be used for data encryption can be managed via " Certificate and Key Management " und...