Sunday, February 22, 2015

Inbound and Outbound Change Set


What is a deployment?

“Deployment” term is very similar to moving your work from one place to another, It is migrating the changes from one environment to another.

What is a change set?

Change set is a carrier that picks all your changes, customizations (series of components) from one environment/organization to another organization by uploading and deploying the change sets.  

Note: Change sets require a deployment connection between the two organizations.


Outbound Change Sets

This is a change set that you build to send changes, customizations that you did from one environment to another environment. After building change set in sending environment you have to deploy the change set for the changes to take place. You can use an outbound change set to delete or rename components in another environment.


Inbound Change Set

This is a change set that you receive from your source environment where you made the changes/customization.
After receiving the change set you have to deploy it in your receiving environment.


Note: The change set can include new components or modifications to existing components, such as apps, objects, reports, or Apex classes and triggers.




Saturday, February 21, 2015

Reports


Reports is a powerful tool that helps drive the business and keeps the company on track.What is going on? and what needs to be changed?,  these decisions are strongly influenced by analyzing the reports. Reports give a bird’s eye view of the company’s activity. Users can monitor and analyze historical and current data by building reports. 

Let us take a tour of the reports tab in Salesforce 





1a Reports Tab

Navigate to this tab to create a report. Landing page will look like as shown in the above figure. .

1b)  Dashboard Tab

Navigate to this tab to create a dashboard. Landing page will look like the screen shot below. 

2) New Report/ New Dashboard Create a new report or dashboard by clicking on the button.

3)  Reports and Dashboard Pane: On the left side of this page you will see a vertical pane that contains all your reports and dashboard. 

4) Search Bar: Find reports and dashboards easily using this search bar. You can search across all the folders and then refine the results by filters.

5List View: Arrange the list view of the reports based on created by, created date, last modified by, last modified date. Add or remove the option by unchecking them.

6) New Folder: Create new folders for reports and dashboard. Folders are the storage container for reports and dashboard.



How to create a Report in Salesforce?

Step 1: Go to Reports Tab
Step 2: Select the report type from the left pane
Step 3: Click on Create button



Once you hit create report you will land on the following page. 

Let us take a tour of this page.






1) Build your report using report builder. Drag and drop the fields in to the column section of the report.

2) This is where you drag and drop the fields from the left pane.

3Choose the type of format for your report that organizes your company’s data in the best suitable way. The types of format are given below

a)     Tabular
b)     Summary
c)     Matrix
d)     Joined

4) This option shows all the details for your report.

5) Remove all columns: This option removes all the fields that you drag and dropped into the report. 

6Set the report filers from this option. You can define date field, range, time frame by using appropriate drop down options.

7) Report properties can be modified in this section. For example report name, report unique name, report folder.


8Add report type: If the report type selected is a joined report, additional reports can be added by using report types.

9) Once you are done with the build of the report, you can run the report to capture the data based on the criteria defined for the report. After running the report you can either save it in a folder or export the data in an excel file. 


10) Filters: Report data can be filtered by choosing the settings option, standard filters, field filters, filter logic, cross filters,and row limits.

11) Use quick find to hover to the fields that you want to build the report.

Example: Create a report for the number of leads that came in this month.

Step1: Click on new Report


Step 2: Select the report type Lead from the list



Step 3: Select Create Report on the right bottom page


Step 4: Drag and drop the required fields from the left pane. To report on the leads created this month we need create date field. Drag and drop this field from the pane. 

Step 5: We need the lead creation report for only this month. From the standard filter section set the date fields and range to this month. 

Step 6: Run the Report 


Hide Details:  Allows you to hide the columns in the report 

Customize: Takes you back to the build page to re- customize your report. 

Save As: Allows you to save the report in a folder

Printable View: This downloads your file in excel sheet to print your report data.

Export Details: Export your data in excel format or comma delimited format.



Step 7 : Save the Report in a report folder and you are done!. 
















Salesforce Basics


About Salesforce


Salesforce is a customer relationship management (CRM) tool. With the growing world of technology it’s very interesting to observe how drastically internet driven ideas and technology is changing. There was a time when setting up a new application in a company required lots and lots of $$ and sometimes experienced product experts  but now with the boom in the cloud technology it is so much easier to create, configure and use business applications of all kinds. Cloud computing has given us the ability to solve new kinds of business problems, new ways of integrating applications with less complexity and reduced costs.  

Salesforce has three releases a year. Each release has new features and enhancements added to the existing features. Salesforce major release schedule section can be found here.

The three salesforce releases are as follows –

1)      Winter
2)      Spring
3)      Summer 

It is recommended to analyze and test the new features in your pre- release org to understand the impact on the existing system. For example: Spring 15’ had some great features like de-duplication, emoticons, contact sync etc.  A company has more than 1500 users. Before the release is scheduled in the production all the new features have to be tested and discussed with the end users to understand the impact. A group of users don’t want to use contact sync functionality in this case you might want to turn if off for a set of users this will impact the security. These changes have to be pre testing in pre- release org. This test environment already has new release features enabled.

For spring 15’ release notes please click here.

Salesforce developer org landing page:



Release Logo:

On the Top right corner of your landing page you will notice a “Logo”. This shows what release you are running under.




Another place to notice the current release is by going on your home page , on the top right corner under App section you will find the current release.  





What is a Tab:  

A Tab helps you to see the related information. For example if you click on “Account” Tab you will see list all of all the accounts of your org.


Let us take a tour of the top right corner of your developer Org  

Profile:

Displays information about you. Your chatter profile photo,  contact information, files, groups, followers etc. 



To know more about My Profile: Click here


My Settings: 

You can customize your personal setting option here like email, chatter, calendar, desktop add-ons, display layout etc.  


Setup: 

This is where you do setups , maintain and customize your org. Build, maintain, package and distribute the Apps in your org.  


Help:

You can locate help section on the top right corner of salesforce. It is your one stop to know everything about salesforce.





Let’s take a tour of salesforce help





1) Salesforce Success Community
Collaborate and communicate with people on salesforce community. This is a great platform to share information, ask questions, join conversations etc.

2) Answers
This is a repository of questions and answers. Some great professionals are always ready to answer your questions on salesforce community.

) Help & training
This section will help you to build your knowledge. It contains training videos built from salesforce. You will find release notes, articles, documentation, tips and tricks, quick start guides, support related questions, certification training material, instructor led courses etc. It has everything and anything you want to know about salesforce.

4) Dreamforce
Dreamforce is the annual conference hosted by salesforce everywhere in San Francisco. More than 100,000 attendees come from all over the world to participate in the events, sessions organized by salesforce.

5)  Collaboration:
Chatter is a forum for anyone to share thoughts and propose ideas. You can share files, data, create groups, topics etc.  





6)  Ideas
Ideas is where you create, innovate suggest new features and vote on your favorite ideas.

For example: I am trying to update the publisher actions on Salesforce 1 app. This publisher action can be located on the desktop main salesforce site but not on salesforce1. This idea can be posted on salesforce community, and depending on how many users come across the same challenge the voting points will increase. Once the voting points reach a certain amount of threshold Salesforce considers it for the upcoming releases.


7)  User Groups

This is another platform to form a network, share and collaborate with professionals all over the world. You will find customer-organized groups that meet online and in-person



8) Contact Support
Customer support service of salesforce. If you are facing any issues, have any questions call or open a case with salesforce. 





9) Known Issues

Salesforce publishes known issues, bugs based on the number of reports that they receive from the customers. You will also find workaround for these  issues in this section.  













What is an Environment in Salesforce?


An Environment is an instance on cloud of force.com platform. In salesforce terminology we often call it an “ORG”. In our previous discussions we created a developer org – an environment. All our environments- developer, production, and sandbox can be accessed from any part of this world by using a web browser.

A very good example to understand the concept of environment is a house. A house is  a physical infrastructure located and built on land. How do you access it? Well you need to be on the land. How do you get inside it? Well you need a key? Right? Similarly an environment is an infrastructure located on cloud. How do you access it? Well you need to be on Internet (browser). How do you get inside it?  Well your login credentials are your keys to access your environment which is floating on the cloud. Once you are in the instance of force.com platform you can access, deploy create applications with various features.


What are the main types of Salesforce Environment?

      1) Production Environment

This is your main org where you have active users (internal, external, paid users), administrators, working on the business data. Production environment is your live data that runs your business.

2)   Developer Environment: 

      This is a free and fully featured copy provided by salesforce.com. By default you will find lot of data in developer org to play with.  You can build, develop, and integrate any app that is designed for your production environment.

3)   Test Environment /Sandbox: 

      Sandbox is the copy of your org usually it is the production photo copy. Changes made to the sandbox environment has no effect on your production environment.  In this environment you can test your configurations, train your end users, without effecting your production data.Test environments are usually refreshed on periodic basis to get the latest configuration and data of your production environment.

Why do you need a sandbox?

Let’s say, I want to build an application in my production environment.  Sandbox is where I would start building my application. I would test, modify the configurations, analyze the impact from all the directions and once I am thoroughly done and satisfied with all the testing then I would deploy or move my changes to the production. This reduces the risks of any failure and helps to run the production smoothly. It depends on the development and process model of a company how they implement these for example - Development and testing is done in  Dev sandbox , changes are moved to full sandbox followed by testing and then finally it is moved to the production. 

Few more examples of sandboxes are CONVERSION- Box ( for data migration), INT-Box (for integration), TEST-Box ( for testing) etc. A major salesforce implementation has two major components Data Migration and Integration. Lets say an insurance company has 1000 sales agents and now when they implement salesforce they have to migrate data from multiple systems or legacy systems or from papers. Data could be huge worth more than 15 years, and if they have existing systems like oracle, SAP they will have to build custom integration. Which sandbox should be used depends on the scope and requirement of the project. 

Types of Environments:

Full Sandbox: This is the full copy of your production environment.

Partial Copy: This environment usually has all the customization of your production environment and some sample data of your production environment.

Developer Sandbox: This environment has all the customization of your production environment. It may or may not have your production data.

Developer Pro Sandbox: This is again similar to developer sandbox but has more data storage.

Partner Developer edition: This is a developer org with more data storage. Free for enrolled partners.


Create your own personal salesforce developer org


Step 1:  

Use an existing email or create a new one for your developer org signup. 
I am using 123sfdccloud@gmail.com . Now go to  https://developer.salesforce.com/signup

  


Step 2:  

Type your first name, last name, email address and user name on the form page.

Please note: User name should be in the form of email but not necessarily it should be a valid email. For example, I have used sfdc123mydevorg@gmail.com

Whereas my email is sfdc123cloud@gmail.com , so before @gmail.com you can basically use any lower or upper case characters, numbers etc.

Step 3: 

Read and accept the agreement and click on sign me up



Step 4: 

You will receive  login confirmation details in your email. Click on the link to confirm your account.



Step 5: 

Salesforce will ask you to provide some more details like password, security question etc. This will help you in case you forget your password later while signing in to your personal developer org.


Step 6: 

Hit Save and you are done!!!

Step 7: 

Now let us login to your brand new developer org. Open any browser and go to https://login.salesforce.com/


Step 8: 

Type in your developer user name and password, for example: sfdc123mydevorg@gmail.com. Now click on " Log into Salesforce" 

Step 9: 

Welcome to your brand new developer org. This is how your spring 15’ developer org landing page will look like, don’t miss the Tour of “improved set up”. It gives you high level basics of where to locate the following - Set up, My Settings, Administration pages, Build Pages, Deploy, and Monitor. 







Friday, February 20, 2015

How to run a Validation rule when a record is created.


Add a rule criteria of evaluate the rule when a record is created by adding ISNEW () function  in the error condition formula. ISNEW() function checks if the record is new, and returns TRUE if it is a new record otherwise it returns a FALSE value.



Thursday, February 19, 2015

How Long a Lead remains in “Open Not Contacted” Status?

There may be a better way to do this, but I followed following approach. Feel free to add comments.

Approach:


We want to know how long a lead stays in "Open Not Contacted Status". Create custom field “Status from Open Not Contacted” – This field will capture the date when the lead status is changed to “Open Not Contacted” Status. Now create another custom field – “Status to Open Not Contacted”. This field will capture the date when the lead status is changed from “Open Not Contacted” Status to any other lead status. How will the dates get populated in these fields? We will use workflow rule field update. Once we have the dates we can use custom formula field and get the number of days a lead stays in “Open Not Contacted” status. 


Step 1:  Create two new custom fields on Lead object

1.    Status to Open Not Contacted

Data type: Date
Description: This is a date field that gets populated when the lead status is changed to "Open Not Contacted".

2.   Status from Open Not Contacted

Data type: Date
This is a Date field that gets populated when the lead status is changed from "Open Not Contacted" to any other lead status.

Please Note: You can use the data type as Date/Time if the lead duration is required in terms of both days and hours. I have used data type as “Date” because I want to know the lead duration in terms of days. For data type “Date” if Lead duration for a particular stage is less than 24 hours it will be show as 0 days. It is important to use the same data type for the above custom fields.

Step 2: Create Field update workflow rule for Status to Open Not Contacted

Formula:

(Lead: Lead Status EQUALS OPEN: Not Contacted) AND (Lead: Status to Open Not Contacted EQUALS null)

Field to update: Lead: Status from Open Not Contacted

Formula Value: TODAY()

TODAY() function return the current date and this will give me lead duration in terms of days. 


Please note: If you are using data type Date/Time for the two custom fields that we created earlier then you might want to use NOW() function instead of TODAY(). NOW() function returns the Date/Time value of the current moment, this will give you  Lead duration in terms of days as well as hours. In case you are using NOW () function you might also want to adjust the decimal places of the formula field as well to accommodate time in terms of hours. Because, If you leave the decimal place as 0 then the duration would be still in days and not in hours. 





Workflow rule formula Explanation:

This workflow rule will fire only when lead status changes to “Open not contacted”.
AND condition checks whether all the arguments listed in your condition are true

Null condition checks if the field is blank. We don’t want to fire this rule again and again unless the field is not blank.


Step 3: Create Field update workflow rule for Status From Open Not Contacted

Formula:

AND(ISPICKVAL(PRIORVALUE(Status), "Open: Not Contacted"), NOT(ISPICKVAL(Status,"Open: Not Contacted")), ISNULL( Status_From_Open Not Contacted__c ))

Field to Update: Status From Open Not Contacted

Formula : TODAY()












Workflow rule formula Explanation:

What are we trying to do here? We want the new custom field that we created “Status From Open Not Contacted” to catch the date when the lead status was changed FROM Open not contacted Status. The catch here is FROM!!!! Which means that we don’t care the current value of lead but our prior lead status value should be “ Open Not Contacted” for this  purpose we have used ISPICKVAL(PRIORVALUE) Function in our workflow rule. 


Oh! Wait a minute of course we don’t care the current value of lead status but we don’t want the current status to be “Open Not Contacted” Right? So lets add a condition in our workflow rule that the current value of the lead status should not be “ Open: Not Contacted” for this we will use NOT(ISPICKVAL(Status,"Open: Not Contacted")). Ok we are good so far. 

Now we want our workflow rule to fire only when the “ Status from Open: Not Contacted” field is empty. So lets add ISNULL function. ISNULL( Status_From_Open Not Contacted__c )) will check if the field empty. As soon as all our conditions are true the workflow rule will do a field update with todays date for this we have used TODAY () function.  Our AND condition will take care that if any of the arguments listed in our formula is not true it will return a false value and your workflow rule will not trigger. 

Step 4: Create a custom formula field on lead 


      Field Name: Open Not Contacted Days

Data type: Formula (Number)

Description: This is a Number field that shows how long a lead remains in "Open Not Contacted" Status

Decimal places = 0

Formula:

if ( ISNULL(Status_From_ Open Not Contacted __c) , TODAY() - Status_To_ Open Not Contacted __c, 

Status_From_ Open Not Contacted __c - Status_To_ Open Not Contacted __c )  



Explanation: 

ISNULL expression checks if the field “Status from Open Not Contacted” is Null (blank) and returns TRUE. If yes then the formula will subtract today’s date with the date populated in the field that we created earlier “Status to Open Not Contacted” We also want to know the running count of the number - when a lead is in “Open Not Contacted Status”. Null condition will check if field is not Null (blank) the function will return FALSE – ie subtract the dates populated in our custom fields “Status From Open Not Contacted” to “ Status to Open Not Contacted”.