Friday 10 January 2014

Useful shortcut keys for SQL Server Professionals


To open a new Query Window with current connectionà Ctrl + N

To toggle between opened tabs                                               à Ctrl + Tab

To show/Hide Results pane                                                      à Ctrl + R

To execute highlighted query                                                   à Ctrl + E

To cancel the executing query                                                  à
Alt + Break or Alt + Scroll Lock

To make selected text uppercase or lowercase                  à
Ctrl + Shift + U, Ctrl + Shift + L

To display estimated execution plan                                      à Ctrl + L

To include actual execution plan                                             à Ctrl + M

To intelligence list member and complete word                à Ctrl + Space, Tab

To go to line                                                                                    à Ctrl + G

To comment and uncomment lines of code            
à

Ctrl + K & Ctrl + C; Ctrl + K & Ctrl + U

Thursday 9 January 2014

Learning Salesforce – Part-9



Part-8 can be found from here (Learning Salesforce - Part-8)

Sales cloud Management

1)   Create a Campaign
2)   Create a Lead (Choose the associated campaign)
Note: Check the no of leads in Campaign
3)   Convert the lead as an Account, Contact, and Opportunity……….
Note: One Account can have multiple contacts and Opportunities.
4)   We have to define a custom product and Price book(Go for all tabs there you may find Products and Price book tabs)
5)   Come back to Account and Scroll down Click on Opportunity
6)   Choose Price book for that opportunity
7)   Add Products to that Price book
If we have any Partners, Competitors are there for that opportunity we can maintain those on formation under opportunity.
8)   Create a Quote for Customer (We have to enable to Quotes,  so jus check whether quote is enabled or not)
9)   Generate PDF
10)                   Give Discount on Quote line items
11)                   Generate PDF
Service Cloud management


1)   Maintain an Asset Record to each and every sold product. (Must and should give serial number)
2)   Give a Contract period to the customer.
3)   Whenever Customer (Call, Mail) you log a case under cases object.
Whenever we are closing the case we have to give the solution to that case. That solution would be useful for us in case in future if any customer suffering with the same query we can solve it in a less time.


Learning Salesforce – Part-8



Part-7 can be found from here (Learning Salesforce - Part-7)

Reports and Dashboards
 
Reports and dashboards show how we performed in the past and what’s happening at the moment—they’re key to driving success and adoption for any CRM project.

The information provided by reports and dashboards is especially important in today’s environment, where it’s critical to be proactive, rather than reactive, in your approach. You want to be able to spot trends and act on them immediately.

For example, a sales organization wants to know which deals were lost, which competitors are gaining ground, and whether the average time to close is increasing or decreasing. For a customer service organization, it’s important to track the average days or time to close and satisfaction.

Report formats in sales force:

We have the following types of report formats in sales force.

    1)     Tabular reports are the simplest and fastest way to return your data in a simple list view format. Keep in mind that tabular reports can’t be used to create dashboard components.

    2)     Summary reports return your data with subtotals and other summary-level information.  Summary reports are great for showing average dollar values for closed won opportunities by salesperson or number of cases by status by support representative.

   3)    Matrix reports show data summaries against both horizontal and vertical criteria; for example, total sales per sales rep per year by quarter.


Dashboards

Dashboard is nothing but the graphical representation of the Reports you have prepared.

In Dashboards we have Components and data sources.

Components is nothing but types of dashboards say like Vertical bar chart, Horizontal bar chart, Gauge, Pie chart ,Donut chart , Funnel Chart etc.

Data Sources is nothing but the reports for which you want to create dashboard. Data sources would be either Reports or VF pages.

Path for Creating Report:

*Click on Reports Tab
*Click on new report
*select the report type
*Add the fields based on requirement
*Add chart
*save the report and then Run the report.

Path for Creating Dashboard:

*Click on dashboard Tab
*Click on new dashboard
*Select the type of component and Drag it.
*Select the Data Component and drag it then save the dashboard.


Note: For Tabular format report we can’t be able to create Dashboard and we can’t be able to add the chart.

Learning Salesforce – Part-7



Part-6 can be found from here (Learning Salesforce - Part-6)

Data Management

There are two tools for managing data in salesforce.

à Import wizard
à Data loader

Import wizard:

1.    Import wizard is capable of up-to 50000 Records.
2.    It will work for only standard objects Accounts/Contacts, Leads, Solutions & Custom objects.
3.    Import data into sales force.
4.    Duplicates will not be allowed.
5.    Don’t have Batch size.

Data Loader:

1. Data Loader is an application for the bulk import or export of data.
2. Data Loader is used to insert, Update, Upsert, Delete, Export, Export all sales force records.
3. When importing data, Data Loader reads, Extracts and loads data from CSV files when exporting data, it outputs CSV files.
4. It supports up-to 1mllion records.
5.    It supports for all standard and custom objects.
6.    Duplicates will be allowed in data loader.
7.    Data loader has a batch size.

Steps to Installing Data Loader:

1. Setup
àData ManagementàData Loader
2. Click “Download Data Loader” and save it in your PC and then install it by agreeing the license agreement.
3. To start Data Loader Double click the icon on your desktop.

Data Loader Operations:

Insert: This operation is used for inserting records into salesforce.
Update: This Operation is used for updating the existing records in salesforce.
Upsert: This Operation is the combination of insert and update. This operation is used to inserting the records and updating the existing records in sales force.
Delete: This operation is used for deleting records from sales force.
Export: This operation is used for extract all the records from sales force into CSV files.
Export All: This operation is used for extract all the records from sales force into CSV files.i.e, including records in recycle bin also.

Login Credentials for Data Loader:

User name: Same as Org Username
Password: OrgPwd + Security Token.

How to generate Security Token:

Setup
àPersonal setupàMy Personal informationàreset my Security token.

Then you may get a message to your mail regarding the security token.

Exporting:

1. Choose an object
2. Click on browse button select a CSV file to which the data will be exported.
3. Click next.
4. Select the fields we want to export(If we want we can give conditions to filter a set of records)
5. Click on finish.

Inserting:

1. Choose an Object
2. Click on browse button to select the source CSV file from Computer for inserting records into sales force.
3. Click on Next.
4. Map fields to the fields in the sales force object
5. Click on create or edit map then click on Auto match fields to columns then Click OK.
6. Click Next and then Click Finish.

Updating:

1.    Almost same as inserting. But only difference is for updating ID is mandatory.

But for inserting, ID is not required.

Deleting:

1. To perform delete operation first we have to export the record Id into your PC.
2. Click on Delete and select the object.
3. In mapping map the ID field and then Click on next then Finish.

Upserting:

1. Upsert=Insert + Update
2. Process is same as Inserting.
3. If we are giving the ID for any records those records should be updated. And whatever records are there without ID those records should be inserted.

Wednesday 8 January 2014

Script to find the TRIGGER by using field name



This script will list out the Trigger details based on the input column name.

SELECT
                        SO.Name [Trigger Name],
                        SSC.TEXT TriggerText
FROM                                
                        sys.syscomments SSC,
                        sys.objects SO
WHERE
                        SSC.Id                                                = SO.OBJECT_ID
                        AND SSC.TEXT       LIKE '%' + 'Name the Specific Column Name Here' + '%'

                        AND TYPE                           = 'TR'

How to use TOP Clause with variable in SQL Server



In SQL Server, if we try to use variable with TOP Clause, it does not work. In order to overcome this issue, we would require using variable in bracket with TOP Clause.

Find below the simple code and example.

Example Code

CREATE PROCEDURE GET_STUDENT_LIST
     @No_Of_Records INT
AS
      SELECT TOP (@No_Of_Records)  * FROM [Student Master]
GO

Execution Result

EXEC GET_STUDENT_LIST 10


Learning Salesforce – Part-6



Part-5 can be found from here (Learning Salesforce - Part-5)

E-mail-to-Case

Sales force can automatically create a case when an email is sent to one of your company's support email addresses, such as support@company.com.

Your organization can set up Email-to-Case or On-Demand Email-to-Case to efficiently resolve and correspond with customer inquiries via email.

Case Escalation Rules

What are case escalation rules?

Case escalation rules are used to reassign and optionally notify individuals when a case is not closed within a specified time period.

Why to use case escalation rules?

Common use cases include:

1. Ensuring cases do not go unresolved by support agents (e.g. escalate any unresolved cases to management after 80 working hours).

2.
Prioritizing support of important customers (e.g. standard customer cases are escalated after 80 working hours; gold customers are escalated after 16 working hours).

3. Ensuring the customer support is team is meeting is meeting customer service-level agreements (Entitlements and Milestones greatly expand on the Service Cloud’s ability to enforce SLAs, but are not covered in this guide).

Path &Process for Escalation rules:

SetupàCustomizeàCasesà Escalation rules

1. Create a new rule.
2. Click on that rule name to enter rule entries.
3. Just give any criteria.
4. Assign the case to particular user and select a template.(We can also notify the user and record owner)
5. Select the time criteria and an escalation action.

We can monitor Escalation rules in the monitor section.

Note:
Whenever a case is escalated we can observe a Red Arrow mark symbol which will tells us that particular case is escalated to some other user.

Validation Rules

It is used for validating the data by preventing users not to enter incorrect data.

For example in mobile number field user has to enter only 10 characters. For that we have to write a validation rule for the length of the mobile number field should be equal to 10 char.

Validation rule will contain,

1. Error condition: here we have to give an error condition like if length of account number not equal to 10 it will fire.

2. Error Message: if error condition is met then automatically a message will populate .That message we have to give in error message section.

3. Error Location: We have to choose the location where that error message should be displayed whenever we entered incorrect data.

Learning Salesforce – Part-5



Part-4 can be found from here (Learning Salesforce - Part-4)

What is Web-to-Lead?

Web-to-lead generates a contact form that can be integrated within an existing website.  Each form submission creates a lead record in Sales force.

When is it appropriate to use Web-to-Lead?

Essentially, any time your organization wants to capture leads from a website, web-to-lead is the easiest way to do so.  

For example, use web-to-lead to add a “Contact Us for Pricing” form on your existing website that creates a lead record in Sales force for every form submission.

Path & Process for web-to-Lead:

SetupàCustomizeàLeadsàWeb-to-Lead.

Just check web-to-enabled checkbox. (Make it Enable)

1. Create a web-to-lead form
2. Select the entire field you want to display in the form
3. Click on generates, just copy the html code and save it as a html file.

Whenever we open the html file form will come (on desktop) just give all the details and submit, check your leads automatically a lead will be created in our org.

Assignment rules


What are lead assignment rules?

Lead assignment rules will change the owner of a newly created or reassigned lead based on a set of rules defined by the system administrator.

Why use lead assignment rules?

Use lead assignment rules to ensure that lead records are assigned (or re-assigned) to the correct user or queue for action.

Example:
My Company sells both products and services.  We use a custom field ‘Type’ on lead to indicate which the customer has expressed interest in.

If the lead is interested in products, then the product team will follow up.  If the lead is interested in services, then the services team will follow up.

How is lead assignment rules executed?

Lead assignment rules are executed sequentially.  The first rule where the record matches the rule criteria will determine the record owner.

How many different lead assignment rules can I create?

We can create more than one set of many lead assignment rules, but only one can be active at a time.  The active lead assignment rule is automatically selected in several scenarios, including web-to-lead submissions, as discussed below.

We may want to use multiple lead assignment rules to correspond to different processes (for instance, leads uploaded from marketing are treated differently than those created via website submission).

Path & Process for Assignment rules:

SetupàCustomizeàLeadsàAssignment rules for leads

Setup
àCustomizeàCasesà Assignment rules for cases

1. Create a new rule.
2. Open that rule to enter rule entries, just give any criteria.
3. Select the user to whom that record will assign.

For manually entered leads we have to check the checkbox assign using active assignment rules.

 Note: If we want to reorder the rule entries we can reorder.