Thursday 30 October 2014

User Licenses in Salesforce

User Licenses:

A user license determines the baseline of features that the user can access. Every user must have exactly one user license. You assign user permissions for data access through a profile and optionally one or more permission sets.

Salesforce has many license types which can get confusing.  To keep things straight, we’ll start with a brief summary of license types and then give more detail below.

Salesforce’s different user licenses give users different access to your data.  (The license type determines which profiles and permission sets are available to the user.)
To view a list of the active user licenses in your Salesforce org,  click Your Name | Setup | Company Profile |Company Information
Here’s the summary of Salesforce user license types:
Salesforce
Full access to standard CRM, custom apps, and AppExchange apps.
Salesforce Platform
Custom apps & core objects (Accounts, Contacts, etc) only; no CRM (no Opportunities or Forecasts).
Force.com – One App
One custom app & read-only for accounts and Contacts; no CRM.
Knowledge Only User
Salesforce Knowledge app only.
Chatter Free
Access to Chatter for people in your company without a Salesforce license.  No additional cost.
Chatter External
Allows your customers to use Chatter groups.  No additional cost.

Chatter Only (aka Chatter Plus).



Standard Profiles In Salesforce

There are six (6) Salesforce standard user profiles. 
     Additional standard profiles will appear when certain conditions are met within an organization, such as enabling Chatter, Partner Portal, Customer Portal, or Sites



Standard Profiles which mostly used are:

       ·         System Administrator
·         Standard User
·         Read Only
·         Solution Manager
·         Marketing User
·         Contract Manager



Tuesday 28 October 2014

Restricting Users through Validation rules

Restricting Users through Validation rules:

 Using Profiles and Userids We will restrict users in Salesforce.



IF( ISPICKVAL(<FIELD_NAME>, "<FIELD _VALUE>") && $User.Id = "<USERID_NUMBER>", TRUE, FALSE)


For example, this is the formula I used:

1.IF( ISPICKVAL(Type, "prospect") && $User.Id="005900000034iOC",TRUE,FALSE)

 2.IF(OR( ISPICKVAL(Type, "prospect"),ISPICKVAL(Type,"other")) && $User.Id="005900000034iOC",TRUE,FALSE)



3.AND(  OR (ISNEW(), ISCHANGED (Type)),  OR (ISPICKVAL(PRIORVALUE(Type), "Customer"), ISPICKVAL(Type,"Customer")),  OR ($User.Username <> "xxxx@nnnnn.com"),  OR ($User.Username <> "xxxx@nnnnn.com"))




Sunday 26 October 2014

Tracking Field History in Salesforce through SOQL and UI

Tracking Field History


You can select certain fields to track, and display the field history in the History related list of an object. You can track the field history of custom objects, as well as the history of the following standard objects:

§  Accounts
§  Cases
§  Contacts
§  Entitlements
§  Service contracts
§  Contract line items
§  Contracts
§  Leads
§  Opportunities
§  Articles
§  Solutions


To track field history for custom objects and standard objects.

1.      From Setup, click Create | Objects.
2.      Click Edit next to the name of the custom object.
3.      Select the Track Field History checkbox

  When you enable tracking for an object, be sure to customize your page layouts to include the object’s history related list.

4.      Click Save.
5.      Click Set History Tracking in the Custom Fields & Relationships section.
This section allows you to set a custom object’s history for both standard and custom fields.
6.      Choose the fields you want tracked.
You can select up to 20 standard and custom fields per object. You can’t track:
§  Formula, roll-up summary, or auto-number fields
§  Created By and Last Modified By
7.      Click Save.
Salesforce tracks history from this date and time forward. Changes made prior to this date and time are not included.



 SOQL to Track History.


Select Amount, leadsource, (Select OldValue, NewValue From histories) From Opportunity


SELECT name,CreatedDate,Fees__c,languages__c,(select field,oldvalue,newvalue from histories) FROM student__c

Custom Object:





Standard Object:



Saturday 25 October 2014

Triggers IN Salesforce

Triggers

Trigger:
Apex can be invoked through the use of triggers. A trigger is Apex code that executes before or after the following types of
operations:

insert
update
delete
merge
upsert
undelete
Triggers can be divided into two types:

Before triggers can be used to update or validate record values before they are saved to the database.

Ø  The first being that you can perform data validation and reject a record before it is committed to the database, meaning there is no cost to performance by the system having to roll back an update. Second, you can update fields or set default values for a record without having to initiate another DML command.

Ø  For example the code below illustrates setting a default value on a record. No DML required.


trigger beforetriggerex on Account (Before insert,before update) {
   
  //setting default values in account

    for(Account a : Trigger.new){
     a.rating = 'hot';
     }
    
     // setting  validation rules

     for(account a: trigger.new){
     if(a.type == 'prospect'){
       a.type.adderror('change account type');
     }
     }
    
     //fields update

     for(account a : trigger.new){
     if(a.phone != null){
       a.fax = a.phone;
       a.website = 'www.salesforce.com';
     }
    
     }
       
}



After triggers can be used to access field values that are set by the database (such as a record's Id or lastUpdated field), and to affect changes in other records.

trigger createNewAccountOpportunity on Account (after insert) { 
    List<Opportunity> listOpportunities = new List<Opportunity>();

    for (Account a : trigger.new) {
        Opportunity o= new Opportunity();
        o.Name = a.Name;
        o.AccountId = a.Id;
        o.StageName= 'prospecting';
        o.CloseDate = System.today() + 30;
       listOpportunities.add(o);
    }
 insert listOpportunities ;
}

Thursday 23 October 2014

Winter 15 Features

                  Salesforce Winter 15 release
                      

Customer/User’s Point of view :-

1.  Ability to convert leads from Salesforce1 app (Beta) : – Now Sales reps can convert, qualified leads to contacts and create opportunities on the fly which helps sales reps to grow their revenue pipeline. This option is available in all versions of Salesforce1. To enable this feature follow the path Setup | Build | Customize | Leads | Settings and select “Enable Conversions on the Salesforce1 App” check-box as shown in the attached screenshot
  


2.  Set Up Salesforce1 with the Salesforce1 Wizard :-  The Salesforce1 Wizard provides an simple way to complete the necessary setup tasks for the Salesforce1 mobile app. The wizard is ideal for you if you are new to Salesforce1 and would like a visual tour of its key point-and-click settings.
     



Salesforce 1 setup
3. Territory Management 2.0 (GA):- Territory Management 2.0 lets you model your sales territories into a logical and flexible structure that connects sales reps to the accounts they sell to. On few clicks System administrator can enable  this feature in new Salesforce organizations and organization created before Winter’15 release need to raise case with salesforce.com support to enable the feature.

Territory Management 2.0
4. Duplicate Management (Beta) : – To maintain clean and accurate data in your organization, Salesforce introducedDuplicate Alerts and Blocking with Data.com. It provides a way to control whether and when you want to allow users to create duplicate records inside Salesforce, customize the logic that’s used to identify duplicates, and create reports on the duplicates you do allow users to save.
5 Community Designer (Beta) :-  Community Designer allows you to create, brand, and publish a custom community site that looks great on any mobile device! Choose from four templates to quickly start your site, and then easily style the pages to match your company’s branding.
6 Access and Share External Files with Files Connect :- Once you are done with set up Files Connect, you can access files from external data sources like SharePoint, or share them via the Files tab and feed.
 Unlisted Chatter Groups : - Now you can give your users a more private option for collaboration in Chatter. Unlisted groups offer more privacy compared to private groups, because only members and users with the “Manage Unlisted Groups” permission can access unlisted groups in list views, feeds, and search results. To enable this service follow the path Setup | Build | Customize | Chatter | Settings navigate to Groups section and select “Enable Unlisted Groups” check-box as shown in the below screenshot.

Unlisted Group
8 Allow Attachments via Email : - Now you can allow your user to add attachments while post to groups using email. To enable this feature follow the path Setup | Build | Customize | Chatter | Email Settings and select “Allow Attachments via Email”  check-box.
9.  Delegated Administrators Can Assign Permission Sets : – After Winter’15 release you can specify permission sets that delegated administrators can assign to users in specified roles and all subordinate roles. This way, you can delegate permission set assignment tasks while maintaining strict control over which permission sets delegated administrators can assign.
10.  Supported Languages Changed and Added : – Norwegian (no) is now a fully supported language, andPortuguese (Portugal)  (pt_PT) and Slovak (sk) are now end user languages.
11.  Process Changed for Enabling Multiple Currencies : – The process for enabling multiple currencies has a new confirmation step. Organizations that are growing and need to track monetary values in multiple countries should find it easier to activate multiple currencies. To approve the activation of multiple currencies in the organization follow the below steps Setup | Administer | Company Profile | Company Information and select check-box “Allow Support to Activate Multiple Currencies” as shown in the below screenshot.


Enabling Multiple Currencies
12.  Security Tokens Required for API Logins from Callouts : – Security tokens are now required for API logins from callouts in API version 32.0 and later. In API version 31.0 and earlier, security tokens are not required by default.
13.  File Upload and Download Behavior : – When Don’t allow HTML uploads as attachments or document records is enabled in your organization, users can’t upload .swf and .xhtml file types, in addition to .html, .htt, .mht, and .svg file types.

Developer Point of view:-

1. Improvements to Setup Search (Beta) : – Now you can search for even more individual items, like workflow rules, email alerts, field updates and email templates etc. by name. Advanced Setup Search is automatically enabled in new and existing organizations.
2. Set Session Timeout and Password Policies for Individual Profiles :- Now you can customize the session timeout and password requirements on every profile for better control over the user experience than previous settings applied to the entire organization. The settings for session duration and password policies at the profile
level override the settings at the organization level.
Set Session Timeout and Password Policies
Set Session Timeout and Password Policies
3. Run More Future Methods and Callouts :-  The execution limits of future methods and callouts in an Apex transaction have increased to 50 methods and 100 callouts respectively. These limit increases enable you to do more with Apex without having to be restricted by the previous limits.
4. Run More Tests in Sandbox and Developer Organizations :-  The test execution limit for asynchronous tests has increased and you can now run twice as many tests in large sandbox or Developer Edition organizations. The increase in the test execution limit increase applies to sandbox organizations in all supported editions and Developer
Edition organizations. This limit is unchanged for production organizations in all other editions.
Run More Tests in Sandbox and Developer Organizations
5. Deploy with Active Jobs :- An option has been added to the Deployment Settings page that lets you deploy components referenced by active Apex jobs. With this option, you don’t have to cancel Apex jobs to be able to have a successful deployment. Previously, deployments failed if they contained components that were referenced by Apex jobs that were pending or in progress.
6. Visual Flow Enhancement :- There are several enhancements in Visual workflow, those are followings
A) Automate Time-Based Processes :- Use the brand-new Wait element to automate processes that require a time-based waiting period. For example, you can create a flow that activates a contract, waits until one day after the contract is activated, and then emails the customer with a feedback form.
B) 
Store Multiple Values Together in a Flow 
:- Collection variables allows you to store multiple values together of similar data type. So that you can operate on them by using the new collection variable flow resource. Using collection variables can help you conserve limits by not querying the Salesforce database for that information.
C) Submit Records for Approval from a Flow (Generally Available) :- With the new Submit for Approval element, you can configure a flow to submit a record for approval without any code. Previously, to do this in a flow you had to write an Apex class and expose it in the Cloud Flow Designer as an Apex Plug-in or Apex trigger. In the ‘Summer’14release, the Submit for Approval element was available only through a pilot program and you could only specify the record to submit.
New Static Actions
New Static Actions
D) Post to Chatter from a Flow :-  With the new Post to Chatter element, you can easily configure a flow to post the feed of a record, user, or Chatter group. These posts can include mentions and topics. Previously to create a post from a flow, you had to use an Apex Plug-in or create a FeedItem record.
E) Receive Email for Each Unhandled Fault :- Previously, when multiple interviews resulted in unhandled faults whose messages were similar, the flow creator received an email for only the first unhandled fault. When the “Flow Creators Receive Email for Each Unhandled Fault” critical update is activated, flow creators receive one email for each unhandled fault that occurs. That way, you and other flow creators are aware of every fault that occurs in one of your flows.
7. Visualforce Enhancement :- There are several enhancements in Visual workflow, those are followings
A) Add Data Access to Your Visualforce Pages with Remote Objects :- Remote Objects is generally available. This exciting feature for adding data access to your JavaScript-based Visualforce pages is now supported for production use. There are two new query operators that you can use in your Remote i.e in and nin

B) 
Preserve sObject Field Encryption in Visualforce Expressions 
:- For Visualforce pages set to API version 32.0 or later, expressions that reference encrypted sObject fields return the encrypted values instead of the decrypted (plain) values. This behavior more closely matches your expectations and reduces the risk of inadvertent exposure of sensitive data due to programmer error.
C) Serve Static Resources from the Visualforce Domain :- When activated, this update changes the way that your static resources, such as images, JavaScript, and CSS files, are served from Salesforce. To avoid broken references to static resources, make sure that you review our recommended best practices. Prior to the Winter’15 release, some static resources, such as images and CSS files, were loaded from the Salesforce Domain. 
8. Refresh Licenses Using the LMA :- Now Salesforce ISV Partners can refresh all customer licenses directly from the License Management App (LMA). This makes it easier for ISV partners to ensure that licenses are up-to-date without having to contact salesforce.com. A license refresh updates the current license information for every installation of a managed package across all Salesforce instances.
9.  View More Subscriber Information in the LMA :- The License Management App (LMA) displays additional information such as the status, instance, and expiration date of customer organizations. Partners can view all relevant license details in one place, making it easier to support customers.
10. Now you can include Person Account components and attributes in managed and unmanaged packages.

Salesforce1 Enhancement:-

1Do Most Actions from the Salesforce1 Action Bar :- Mobile users now have a one-stop place to find actions in Salesforce1. We’ve consolidated actions from different places in Salesforce1 into a new home: the action bar.
Publisher Actions
2View All Pending Approval Requests in One Location :- Salesforce1 lists all pending approval requests in one central place, making it easy for users to keep track of pending approvals and respond to requests while on the go. like we have “Items to Approve” feature on Salesforce home page. This feature is available in the Salesforce1 mobile browser app only.
3Share a Dashboard Snapshot in Chatter :- Salesforce1 mobile browser app allow users to post a snapshot of a dashboard component to Chatter by mentioning a group or a user. When viewed from the mobile browser app, the feed shows a thumbnail preview of the component, along with the comment. Other users reading the feed in the mobile browser app can tap the thumbnail to open the full dashboard.
Share Dashboard Snapshot
4Drill Down from a Dashboard to a Matrix Report:- When viewing a dashboard in any version of the Salesforce1 app, users can tap a dashboard component to see the report that’s delivering the data to the dashboard. This is now available for matrix reports as well as tabular and summary reports. Users can see a maximum of 2,000 records.
5Floating Report Headers :- When users scroll down to read a report, the header rows at the top stay visible, This is similar feature like we have for Salesforce browser version.
6Filter List Views:- Salesforce1 mobile browser app users can filter existing list views to see just the records they need, instead of cluttering up Salesforce with even more list views.
7Attach Files to Comments on Feed Posts :- After  Winter’15 user can attach files directly to comment on feed posts using the Salesforce1 mobile browser app, as well as the Salesforce1 downloadable apps. Users can attach files from Salesforce or files stored on a mobile device.
8Log Calls Faster :- Your sales reps no longer need to fiddle with all the fields in a task record when they’re simply trying to log a call. The Log a Call action available on leads, contacts, and accounts now displays only key fields. This will save your Sales reps time.
9. Events in a Weekly View:- This is one major enhancement in Salesforce1. Events are now available in a weekly view, allowing users to see an event list for a specific day, including previous days instead of having to scroll through a single list of all events. And for Salesforce1 mobile browser app users, it’s now possible to create new events directly from the Events page.
10Clone Contact Records :- For all versions of Salesforce1, the Clone action is now available on contacts. This action isn’t available for other objects like accounts, however.




Complete Salesforce CPQ training Free videos

Salesforcestart:: We are excited to announce that our YouTube channel, Salesforcestart, is your one-stop-shop for all things Salesforce CPQ!...