Monday 27 November 2017

Salesforce Admin Track Tips

My advice to Salesforce beginner who wants to learn Salesforce

Every beginner who wants to learn salesforce should sign up for free developer edition.

https://developer.salesforce.com/signup

Go through various salesforce videos.

Subscribe for Salesforce channel in youtube. They have huge collection of videos from where anyone can learn.

Check Salesforce page and go through demo videos for Sales cloud, service cloud, marketing cloud and huge collection of product videos.

 Start learning with trailhead. Please check below links.

https://trailhead.salesforce.com/en/trails/force_com_admin_beginner

https://admin.salesforce.com/df17adminkeynotetrailmix

Every beginner should join local salesforce groups.

New delhi salesforce group arrange salesforce saturday event where they share salesforce technical sessions free.

https://www.meetup.com/New-Delhi-Salesforce-Platform-Developer-User-Group/?_cookie-check=xUsZANKXKN0bZcBT

Gurgaon WIT group

http://events.salesforceusergroups.com/gurgaonindiawomenintech

Noida Salesforce Group

www.meetup.com/Noida-Salesforce-Developer-Group/

Friday 17 November 2017

Dreamforce 2017 Keynotes

Dreamforce17 was four days of transforming your career, innovating, giving back, having a ball, and connecting with your community of fellow Trailblazers — all at the largest software conference in the world.

Below are few keypoints from Dreamforce.

myTrailhead


Reinvent learning and enablement at your company with myTrailhead. We can customized our learning with Trailhead.

CUSTOMIZE CONTENT - We can customize our learning content.

EMPOWER EMPLOYEES - Skill up employees with on demand learning.

SHARE GUIDED PATH - Create custom path for learning journey.

RATE AND REWARD- Give feedback and reward employees on their contribution.

myEinstein


Now anyone can build custom AI-powered apps with clicks, not code — with myEinstein. Now Trailblazers can build smarter, more predictive apps that leverage their Salesforce data and solve their specific business challenges with myEinstein. So everyone can have AI that’s customized for their business, without needing a data scientist.

mySalesforce

Create your own custom-branded mobile app that drives adoption with mySalesforce.  With our Listing Wizard, you can even list it in the App Store and Google Play as your own.

myLightning

myLightning tools let you customize apps with your own branding and theming. Plus, trust and security from the world’s #1 enterprise cloud platform is always built in.

Personalize and build apps with Lightning App Builder.

Build apps with a rich library of easily configurable components that let you create pages and responsive apps by simply dragging and dropping. You can even add custom themes and branding to make any experience your own.

myIOT


Customize IoT engagements to drive real business value with myIoT.
Collect data at IoT scale, trigger actions with real-time rules, and use the power of Salesforce to engage with customers proactively through sales, service, or marketing business processes.

Keep Learning!

Salesforce WIT webinar

Salesforce supports equality for everyone. Salesforce, believe their higher purpose is to drive Equality for all. As part of this, we believe that companies, and the people who lead them, can be powerful platforms for social change. Equality takes commitment from each and every one of us.

Salesforce supports women in IT group. This time they have comeup with new webinar for the @salesforce Women in Tech Community feat. Chief Equality Officer, @tony_prophet, on Nov. 20 at 9am PT!

 Watch in-person with your local Salesforce WIT Community Group OR register to join remotely: https://t.co/4eQLoQjTgb https://t.co/NXDnpt0JpG

Salesforce Pathfinder program with Delloite

Salesforce has announced partnership with Deloitte.  Salesforce Pathfinder program provides the training and accreditation necessary to be positioned for high paying jobs as Salesforce Administrators and Salesforce Developers.

Salesforce is expecting to create 3.3 Millions new job by 2022.


Salesforce Training


Pathfinders will receive four months of technical training and support to become certified Salesforce Administrators and Developers. Pathfinders will have access to online beginner and intermediate training modules for both roles. Pathfinder Graduates also receive Career Coaching from Salesforce Executives.

Deloitte will also provide pathfinder graduate opportunity to interview with in company. They have launched pilot program in Indianapolis.


The link to sign up for the Pathfinder program is coming soon!








Sunday 12 November 2017

New App Exchange

App Exchange has come with new look and lots of features.

App exchange is providing relevant solutions on the homepage based on a customer’s profile, install history, and site activity when customers log into AppExchange.

Trailhead
We can access Trails from App Exchange.


New Lightning Solutions

Add Lightning Data and Bolt Solutions to the thousands of apps, components, and consultants that customers can find on AppExchange.

Lightning Bolt Solutions enable customers to launch communities with partner-built industry templates.

Refer Salesforce for more info.

Thursday 9 November 2017

Salesforce and Google Partnership to Help Small Businesses

The strategic partnership was announced by Salesforce at its annual Dreamforce'17 conference in SanUnited States earlier this week. 

The prime focus of this joint venture is to enable Small Businesses.

Cloud integration

Salesforce and Google team will work together to combine Salesforce with G Suite, connect Salesforce Lightning into Gmail and add Salesforce customer details directly into Hangouts meetings.


Data will flow seamlessly between Google and Salesforce products, helping companies to make the most from their data and identify new insights.


“Our partnership with Google represents the best of both worlds for our customers,” said Marc Benioff, chairman and CEO of Salesforce. “There has never been an easier way for companies to run their entire business in the cloud – from productivity apps, email and analytics, to sales, service and marketing apps, this partnership will help make our customers smarter and more productive.

https://www.forbes.com/sites/alexkonrad/2017/11/06/salesforce-google-cloud-partners/#3645e3773bbb


https://www.salesforce.com/blog/2017/11/salesforce-google-form-strategic-partnership.html

Thursday 2 November 2017

My Salesforce Experience

Read my salesforce journey from here

http://www.sonikatomar.com/wit-success-stories/whether-you-are-starting-continuing-or-perfecting-your-journey-to-amazing-is-here-seema-dhingra/



Monday 30 October 2017

Express yourself from Dreamoji


Dreamoji is the best way to express yourself with your favorite Salesforce characters.
• Dreamoji lets you choose from Astro, Appy, Einstein, Cloudy, Codey, and more!
• Heading to Dreamforce this year? Share Your Location via iMessage and meet up with colleagues
• Use Dreamoji in Hangouts, emails, and more!
• Add calendar reminders to register for our upcoming events, like Dreamforce '18

You can download it from playstore

https://play.google.com/store/apps/details?id=com.salesforce.dreamoji

Join Dreamforce live from Anywhere

Yes, its true that we can join Dreamforce live from anywhere.

Participate in #DF17 with the millions of Trailblazers online from all over the world on Salesforce Live! Even if you can't join us for Dreamforce in person, you'll have the opportunity to learn, connect and experience the event virtually.

Salesforce LIVE is a free broadcast experience featuring keynotes, studio shows, and surprise interviews with special guests as they happen in real-time from 8 different locations, over the 4 days of Dreamforce. Get included in all of the behind the scenes action, innovation, and learning by registering here for the Dreamforce Live Broadcast Experience.

You can check highlights for each day from here.

https://www.salesforce.com/blog/2017/10/dreamforce-schedule-salesforce-live.html

Register to Watch Live: http://bit.ly/DFLive17

Follow Salesforce Live on Twitter for updates throughout the week


Monday 23 October 2017

Schedule Batch Job

Scheduler Class
-----------------------
global class AccountBatchScheduler implements Schedulable {
   
    // Execute at regular intervals
    global void execute(SchedulableContext ctx){
   
      RunQuery batch = new RunQuery();
      Database.executebatch(batch, 200);
   
    }

}

We can schedule job from developer console.

System.schedule('AccountBatchScheduler', '0 0 * * * ?', new AccountBatchScheduler());


Aggregate queries in Batch Apex



Recently, I came across one requirement, in which i need to use aggregate queries in batch apex .My requirement was to get maximum annual revenue of different account types.


I received below error message.


"Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch". I spent good time to find its solution.


To fix this error what we should do.


1. Create an Apex class implements Iterator<AggregateResult>.
2. Create an Apex class implements Iterable<AggregateResult>.
3. Implementing to Database.Batchable<AggregateResult>, and Using Iterable at start execution in Batch Apex.


Iterable Class

global class AggregateResultIterable implements Iterable<AggregateResult> {
private String query;

global AggregateResultIterable(String soql){
query = soql;
}


global Iterator<AggregateResult> Iterator(){
return new AggregateResultIterator(query);
}
}


Iterator Class

global class AggregateResultIterator implements Iterator<AggregateResult> {

AggregateResult [] results {get;set;}

// tracks which result item is returned

Integer index {get; set;}



global AggregateResultIterator(String query) {
index = 0;
results = Database.query(query);
}


global boolean hasNext(){
return results != null && !results.isEmpty() && index < results.size();
}


global AggregateResult next(){
return results[index++];
}
}

Batch Class

global class RunQuery implements Database.Batchable<AggregateResult> {

// The batch job starts

global Iterable<AggregateResult> start(Database.BatchableContext bc){

String query = 'select name, type, max(AnnualRevenue) revenue from account where annualRevenue!= null group by name, type order by max(AnnualRevenue) desc';

return new AggregateResultIterable(query);
}

// The batch job executes and operates on one batch of records

global void execute(Database.BatchableContext bc, List<sObject> scope){
list <Account_Revenue__c> AR=new list<Account_Revenue__c>();

for(sObject sObj : scope) {
Account_Revenue__c c=new Account_Revenue__c();
AggregateResult a = (AggregateResult)sObj;

c.Name__c=string.valueof(a.get('name'));
c.Annual_Revenue__c=integer.valueof(a.get('revenue'));
c.Type__c=string.valueof(a.get('Type'));
AR.add(c);
}

database.insert(ar,false);
}

// The batch job finishes
global void finish(Database.BatchableContext bc){ }
}


We can schedule job using steps mentioned in this post.








Sunday 20 August 2017

WITNESS SUCCESS - Women in Tech



WITness Success is the event to celebrate success of women. in Salesforce

Its goal is to Empower, support and invest in Salesforce Women in Tech user group members & leaders with a 1 ½ day event. Attendees will learn, network, grow & ultimately excel in their Salesforce careers, be role models and mentor others.

Yesterday, i attended this event in Noida organized by Noida and Gurgaon Salesforce group.

This was indeed great opportunity to learn Salesforce and meet with other girls. Shared our experiences, knowledge and challenges we face in IT industry.

This is again a very good event to praise women success in IT. I hope to have more event like this in future.





Thank you to the entire WITness Success planning team for putting together such an event. You are the reason why the Salesforce community is so great!

Monday 14 August 2017

Singleton Design Pattern

Singleton design pattern is the simplest design pattern in Apex. By using this pattern we can initiate class instance only once.

The Singleton pattern attempts to solve the issue of repeatedly using an object instance, but only wishing to instantiate it once within a single transaction context. It's most common use is to create an object instance that's instantiated only once for the lifetime of that execution context. 

The Singleton design pattern allows Apex code to repeatedly reference an object instance in an optimal manner, whilst mitigating the impact of governor limits.

Problem:- This is one example of inefficient code where developer is initializing class every time  new record is getting inserted in contact object. This will cause an error when we try to insert more than 100 records.

Trigger

trigger AccountTrigger on Contact(before insert, before update) {
for(contact record : Trigger.new){
ContactFSRecordType rt = new ContactFSRecordType ();
....
}
}

Class

public class ContactFSRecordType {
public String id {get;private set;}
public ContactFSRecordType (){
// This could breach the governor limits on describes
// if a trigger is executed in bulk
id = contact.sObjectType.getDescribe()
.getRecordTypeInfosByName().get('Foo').getRecordTypeId();
}
}

Solution
  • Creating a class with a method that creates a new instance of the class if it doesn't already exist
  • If it already exists, then simply return a reference to that object

Trigger

trigger ContactTrigger on Contact(before insert, before update) {
for(Contact record : Trigger.new){
// Instantiate the record type using the singleton class
ContactFSRecordType rt = ContactFSRecordType.getInstance();
....
}
}


Singleton Class

public class ContactFSRecordType {
// private static variable referencing the class
private static ContactFSRecordType instance = null;
public String id {get;private set;} // the id of the record type
// The constructor is private and initializes the id of the record type
private ContactFSRecordType (){
id = contact.sObjectType.getDescribe()
.getRecordTypeInfosByName().get('Foo').getRecordTypeId();
}
// a static method that returns the instance of the record type
public static ContactFSRecordType getInstance(){
// lazy load the record type - only initialize if it doesn't already exist
if(instance == null) instance = new ContactFSRecordType ();
return instance;
}
}
In order to implement a Singleton pattern in Apex, the class must instantiate only a single instance and be globally accessible. It is implemented by:
Some important points from above example:- Constructor should be private so that it can not initialized outside getInstance
method. 

getInstance method will only initiate instance of class if it does not exist
The class defines a private, static instance of itself that can only be referenced
via the getInstance() static method.

The ID member stores the record ID of the record type and is initialized in the
constructor.

Reference

https://developer.salesforce.com/page/Apex_Design_Patterns

http://www.tgerm.com/2010/03/apex-implementing-singleton-design.html

http://www.oyecode.com/2012/12/implementing-singleton-design-pattern.html 

Sunday 13 August 2017

Visualforce Page Life Cycle

First, we need to understand how visualforce page is created and destroyed during the course of a user session. The lifecycle of page is determined by the way page is requested.


There are two types of Visualforce page requests:

  • get request - When a user enters an URL or when a link or button is clicked that takes the user to a new page, get request is made.
  • postback request - When user interaction requires a page update, such as when a user clicks on a Save button and triggers a save action.


Order of Execution for Visualforce Page Get Requests


This diagram is self explanatory.

  1. When user request for visualforce page then Constructor method of controller are called.
  2. If there are custom component of page then constructor of controller or extension are executed. If attributes are set on the custom component using expressions, the expressions are evaluated after the constructors are evaluated.
  3. If attributes are set on the custom component using expressions, the expressions are evaluated after the constructors are evaluated.
  4. View state is maintained. Its updated when page is updated.
  5. The resulting HTML is sent to the browser. If there are any client-side technologies on the page, such as JavaScript, the browser executes them.


Once a new get request is made by the user, the view state and controller objects are deleted.

Order of Execution for Visualforce Page Postback Requests

When user clicks on Save button then postback request is sent.

  1. The view state is decoded and used as the basis for updating the values on the page.
  2. After the view state is decoded, expressions are evaluated and set methods on the controller and any controller extensions, including set methods in controllers defined for custom components, are executed.These method calls do not update the data unless all methods are executed successfully. 
  3. The action that triggered the postback request is executed. If that action completes successfully, the data is updated. If the postback request returns the user to the same page, the view state is updated.
  4. The resulting HTML is sent to the browser.
  5. Once the user is redirected to another page, the view state and controller objects are deleted.



Saturday 12 August 2017

Lightning Experience Roadmap

                     


Lightning has awesome features and Salesforce is continuously working on to improve it. 

Lightning features and ideas on which Salesforce is working can be seen from here

Lightning Report and Dashboard


Lightning Platform




Sunday 2 July 2017

Enable Custom Domain In Salesforce

We can customize login page with our company information like logo, color and right-side content.

Go to setup -> Search for My Domain

Click on edit button in my domain setting.

Enter customized domain in you domain name is field.

In Authentication Configuration section select Header logo, Background Color and Right Frame URL etc.


We can see company's home page mentioned in Right Frame URL field once log out from salesforce.







Saturday 1 July 2017

Keyboard Shortcuts for Salesforce Lightning and Notes new features

Keyboard Shortcuts for Working in Composer Windows

Keyboard shortcut fans are going to love cycling through fields in a composer window and navigating across multiple open windows.
  • Alt+1: opens the overflow menu from anywhere on the page
  • Up and Down arrows: moves through the list of open composer windows in the overflow menu
  • Left and Right arrows: moves between open composer windows
  • Enter (from a composer window’s header): moves focus to inside the composer window
  • Tab: cycles through the fields inside the composer window
  • Esc: moves focus from a composer window to the window’s header
Refer Spring 16 release notes from here

Create a Note from Any Page and make it Private


User can create notes directly from any page and make it private so that no one else can see it.




Notes can be seen from Notes & Attachment section.

Refer Spring 16 release from here

Notes Limitations

  • Private notes are not available.
  • Notes added to contacts and opportunities don’t roll up under the associated account.
  • Notes aren’t automatically added to the parent account.
  • Notes aren’t available for Partner Portal licenses and Customer Portal licenses.

Where are Notes features available?

  • Automatic saving is only available in Lightning Experience.
  • Reverting to earlier versions is only available in Lightning Experience.
  • Adding images to notes is only available in Lightning Experience and the Salesforce1 mobile app for iOS.
  • Creating tasks from notes is only available in Salesforce1.
  • Sharing notes is only available in Lightning Experience and Salesforce Classic.
  • Seeing all notes that you own from the Notes tab is only available in Lightning Experience and Salesforce1.

Monday 26 June 2017

Create your Custom Calendar in Lightning

We can create custom calendar in Salesforce. Sometimes as per business requirement we need to create custom Calendar.

Go to App Launcher and search for Calendar.


Go to My Calendar and click on New Calendar. Select the object on which you need to create Calendar.


Add filter settings for Calendar.


Created two new opportunities for Account where close date is current month only.



Go to  "Sales Meeting Calendar". We can select Custom color for calendar. We can see opportunities from here.



Create Global Action in Lightning Experience

Create New Lead action in Global Action list from following steps:-
  • Click Setup
  • Click User Interface
  • Click Global Actions
  • Select Global Actions 
Click on new Action. Enter label, Target object, success message. From Predefined Field Values enter predefined value.


Go to Publisher Layout. Click on Edit button. Drag global action in Salesforce1 and Lightning Experience Actions.


Global action is created.  From the Global Action tab we can view new Global action button.


Click on custom lead button. We can view predefined value "Working- Contacted" in Lead Status field.



How to create Custom Report type in Lightning Experience?

We can create custom report type from following steps:-

Click SetUp
Click Feature Settings
Click Analytics
Click Report & Dashboard
Click Report Type


Click on New Custom Report Type.



Click on Save Button.

New report type is created. We can use this report type to create new Reports.

Sunday 25 June 2017

Task/Activities in Lightning


Create new task/Activity go to Account/contact page.

Click on New Event tab in Activity Section.











Enter start date, end date, Location, select contact or lead from Name field. Enter Assigned To vale. By default it will be assigned to person who creates it.


We can view event from Next Steps section, once event is created.


Closed Tasks can be seen from Past Activity section.

Thursday 22 June 2017

Try Trailhead Apps

Use Apex, Lightning components, and Einstein Vision to recognize and classify cat images

https://trailhead.salesforce.com/projects/build-a-cat-rescue-app-that-recognizes-cat-breeds

Design a system to configure and send custom notifications based on platform events

https://trailhead.salesforce.com/projects/workshop-platform-eventshttps://trailhead.salesforce.com/projects/build-a-cat-rescue-app-that-recognizes-cat-breeds

Saturday 17 June 2017

Salesforce Platform Developer 1 Exam Tips

The Salesforce Certified Platform Developer I credential is designed for those who have knowledge, skills, and experience building custom declarative and programmatic applications on the Force.com platform.
Here are some examples of the concepts you should understand to pass the exam:
  • Design the data model, user interface, business logic, and security for custom applications
  • Develop custom applications using Apex and Visualforce
  • Be familiar with the development lifecycle from development to testing, and have knowledge of the available environments

I cleared this exam on 15th June, 2017. This exam is little tricky.



Please refer this link for more certification information.  One should have clear understanding about below topics:-


  • When to use process builder or workflows.
  • Describe how to use and apply Apex control flow statements
  • Exceptions
  • Describe the relationship between Apex transactions, the save execution order, and the potential for recursion and/or cascading. 
  • Describe how to implement exception handling in Apex. 
  • Describe how to write Visualforce controllers. 
  • Describe when and how to use standard Visualforce controllers vs. Apex custom controllers and controller extensions.
  • Debug and Deployment Tools and their limitations
  • Describe the benefits of the Lightning Component framework.
  • Schema Builder
  • Describe the capabilities and use cases for formula fields.
  • Describe the considerations when developing in a multi-tenant environment
Practice more and more questions.


Best of Luck for your exam



Thursday 1 June 2017

Sales Cloud Certification Guide & Tips

I have cleared Sales cloud consultant exam on May 24, 2017.  I prepared for this exam in 15 days. If you have work experience in Salesforce then it is great help to clear exam.



The Salesforce Certified Sales Cloud Consultant program is designed for consultants who have experience implementing Salesforce Sales Cloud solutions in a customer-facing role. The Salesforce Certified Sales Cloud Consultant is able to successfully design and implement maintainable and scalable Sales Cloud solutions that meet customer business requirements, and contribute to long-term customer success.

Candidate should have knowledge about all topics mentioned in study guide. Practice more and more questions based on each topic.

You can get more information about certification from following url.

http://certification.salesforce.com/salescloud


A few courses I would definitely recommend are the following:

Territory Management
Campaign Management (Leads)
Salesforce Files, CRM Content, Knowledge, Documents, and Attachments
Opportunity and Forecasting
Setting up Customizable Forecasting 
Products, Price Books, and Schedules Overview
Forecasts Administrator’s Workbook

You can find lots of questions on following websites:-

https://www.proprofs.com/quiz-school/story.php?title=mtyxmty4oa1g6h

http://mansoorsfdc.blogspot.in/2017/03/sales-cloud-consultant-certification.html


Please drop an email to me on salesforcecodelesson@gmail.com if you need any technical help.

Friday 21 April 2017

Salesforce Editions and their limitations

Salesforce offers different editions. We can select edition as per our business need.

Professional Edition

This edition is designed for businesses who need full-featured CRM functionality. Professional Edition includes straightforward and easy-to-use customization, integration, and administration tools to facilitate any small to midsize deployment.

Enterprise Edition

This edition is designed to meet the needs of large and complex businesses. Enterprise Edition orgs get advanced customization and administration tools, in addition to all the functionality available in Professional Edition, that can support large-scale deployments. Enterprise Edition also includes access to the web services API, so you can easily integrate with back-office systems.

Unlimited Edition


Unlimited Edition customers benefit from new levels of platform flexibility for managing and sharing all their information on demand. Unlimited Edition includes all Enterprise Edition functionality plus Premier Support, full mobile access, unlimited custom apps, increased storage limits, and more.

Developer Edition

This edition provides access to the Force.com platform and API. A Developer Edition org allows developers to extend the Salesforce system, integrate with other applications, and develop new tools and applications. Developer Edition provides access to many of the features available in Enterprise Edition orgs.

Editions which are not sold


Contract ManagerGroupPersonalPerformanceDatabase.com

Contract Manager Edition

This edition is designed for small businesses and provides access to key contact management features including accounts, contacts, activities, calendars, notes and attachments, and reports. Contact Manager provides straightforward, easy-to-use customization options.

Group Edition

This edition is designed for small businesses and work groups with a limited number of users. Group Edition users can manage their customers from the start of the sales cycle through the end and provide customer support and service. Group Edition offers access to accounts, contacts, opportunities, leads, cases, dashboards (read only), and reports.

Personal Edition



This edition is a CRM solution designed for an individual sales representative or other single user. Personal Edition provides access to key contact management features such as accounts, contacts, and synchronization with Microsoft Outlook®. It also provides sales representatives with sales tools such as opportunities.

Performance Edition


Performance Edition orgs include all Unlimited Edition functionality plus clean, targeted lead and customer data from Data.com, coaching and feedback tools from Work.com, trusted identity services from Identity, and more. 

Database.com
Database.com is a multitenant cloud database service that’s designed to store data for mobile, social enterprise applications. You can use Database.com as the back-end database for applications that are written in any language and run on any platform or mobile device. Database.com's built-in social computing infrastructure and native support for building sophisticated REST-based APIs enable you to create employee-facing, native mobile and social apps.

Salesforce Edition Limitations



Salesforce Edition limits