Menu Bar

Monday 11 March 2013

What is Permission Set with Example?

What is Permission Set?

A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users' functional access without changing their profiles. For example, to give users access to a custom object, create a permission set, enable the required permissions for the object, and assign the permission set to the users. You never have to change profiles, or create a profile for a single use case. While users can have only one profile, they can have multiple permission sets.

---

A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users' functional access without changing their profiles. For example, to give users access to a custom object, create a permission set, enable the required permissions for the object, and assign the permission set to the users. You never have to change profiles, or create a profile for a single use case. While users can have only one profile, they can have multiple permission sets.
Permission sets include settings for:
  • Assigned apps
  • Object settings, which include:
    • Tab settings
    • Object permissions
    • Field permissions
  • App permissions
  • Apex class access
  • Visualforce page access
  • System permissions
  • Service providers (only if you've enabled Salesforce as an identity provider)
---
 
How many times have you had a requirement that applied to all people of a particular profile except maybe one or two?  For example, you have a sales team profile which most people fit into but you have one power user who may need access to a power user only field.  Prior to permission sets, you'd need to keep two different profiles tied to two different page layouts to hide one field.  With permission sets, you can make the special field available to individual users and keep one layout, one profile.

Here's how you'd build this:
1. Create your new custom field
2. Do not give any profile permission to Read/Edit
3. Add the field to your page layout
4. Create a new permission set
5. Choose Object and Field Permissions
6. Find your Object and Field and set Read/Edit access to TRUE for your field
7. Associate the permission set to your power user
8. Enjoy!

One thing to keep in mind is that permission sets are additive, so these are a great way to extend your base functionality for special users.

Email Opt Out Checkbox Field

Email Opt Out


This Email field will not be visible in fields rather its can be used directly from page layout and assigned  to the user in Contact & Lead object to restrict sending emails just via Mass Email.

In Email marketing, an "opt-out button" may be included to notify the sender that the recipient wishes to receive no further emails. When you enable the Email Opt Out field, the corresponding contact will be removed from your mailing lists and will not receive any emails

Resolution
The Email Opt Out field will allow you to exclude marked contacts from mass e-mail.

To utilize this feature, you first need to make sure this field is visible (to profiles) and also add the field to both your Contact Page Layout and Lead Page Layout if it is not already added. Note, it might be already on the page layout but hidden

To make the the 'Email Opt Out' field visible to all or specific profiles:
1. Click on:

Setup | App Setup | Customize | Contacts | Fields.

2. Click on the 'Email Opt Out' field
3. Cick on the "Set Field-Level Security" button on top and then check the "Visible" box for desired or all profiles
4. Click on Save

To add the 'Email Opt Out' field to the Contacts Tab:

1. Click on:

Setup | App Setup | Customize | Contacts | Page Layouts.

2. Click on the layout name you would like to add the Opt Out field to and click on "Edit".

3. Locate the Email Opt Out field and using your mouse drag and drop the filed into the required section area.

4. Save the Page Layout.


Note: This opt-out button checkbox restricts only to send emails via Mass, but as an individual email email can be send via user where the user gets warning notification that "Warning! Test Test asked not to receive emails. Do you want to send this email?". But the user can still email to the Contact specified.



Friday 8 March 2013

Salesforce Interview Questions Part III

                                           Salesforce Interview Questions
  • How to delete a class from production?
  • How to fire a trigger only once?
  • What is difference between 15 digit Id and 18 digit Id?
  • What is a Batch Class?
  • What is a Schedule class?
  • What are Organization wide defaults or Shared rules?
  • How to Deploy from Sandbox to production?
  • Disadvantages of Salesforce.com?
  • How to synchronize trigger which are written on same object with same type of insert or update operations?
  • What are web services?
  • How to work with salesforce offline?
  • What is Web-to-Lead?
  • How many ways we can create a lead record?
  • What is difference between sharing and without sharing?
  • What is Data Loader and what is External Id?
  • What are difference between between Roles and Profiles?
  • What is a view state?
  • What are different annotations used in salesforce, describe about them?
  • What is Data Merging in Salesforce?
  • What are record types?
  • What are Report types?
  • What are different type of Reports?
  • What are different type of workflows used?
  • Time Dependent Trigger does not work on which type of criteria?
  • What is Salesforce to Salesforce?
  • What is difference between Trigger.new and Trigger.old?
  • What is difference between Rendered,Rerender and renderAs?
  • What are different types of controllers available in Salesforce.com?
  • Difference between SOQL and SOSL?
  • Why is SOSL used for?
  • Difference between System Log and Debug Log?
  • What are the Governor Limits? and specify it for each edition?
  • Some of the Standard objects of salesforce.com?
  • What are different types of Relationships in Salesforce.com?
  • What are different type of Editions?
  • What are different steps in approval process?
  • What is the minimum time to schedule a class?
  • How to give permissions to users for a specific record?
  • What is Lead Convert?
  • Integration of salesforce with other technologies?
  • What is difference between personal account and business account?
  • How many number of records can be retrieved from a query?
  • What is a Campaign?
  • What are different collection in salesforce? What is difference between List and set?
  • What is StartTest() and StopTest()?
  • What are the URL of sandbox and Production?
  • What are difference between managed package and unmanaged package?
  • What is the sequence of execution in salesforce.com?
  • Will CSS is supported in renderAs pdf?
  • What are the symbols used in visual-force page?
  • What are the different action tags used in visual force page?
  • What is actionPoller?
  • What is difference between repeat and dataList?
  • What is the Code coverage to deploy into Production?
  • What is System.Assert() and System.AssertEquals()?
  • What is Rendered?
  • What is RenderAs?
  • What is reRender?
  • What is actionFunction?
  • What is ActionSupport?
  • What is ActionSupport?
  • How can I delete a controller from production?

Tuesday 5 March 2013

Understanding relationships in Salesforce

Relationship between objects are created when you create a field of type Look-up... Of course, Salesforce standard objects come with their own built-in relationships.. Let's categorize relationships into two categories...

  • Standard Relationship
  • Custom Relationship
We all know how a relationship looks like in the UI, for ex: Account - Contact relationship. You can see that one Account can have many Contacts associated to it . When you create or edit a Contact you will have to select a Account from the look-up dialog to establish a relationship...

Now, that's all what we know.. But at the database level there is much more to be explored..

Standard Relationship

Standard relationships are the one's that come pre-built between Standard objects in Salesforce.

Let's understand the Account-Contact relationship.. In Contact you can find a field called Account.. This field establishes the relationship.. When you view a Contact record you will see the Account Name populated in this field... But guess what, that is not actually stored in the database..

The ID of the Account is stored in the look-up field. Hence, all look-up fields would store the ID.

Here is how the actual database fields are....

AccountId - This stores the ID of the Account.
Account -- This stores the relationship of the Account.

So, here come's the interesting part. By using the "Account" relationship you can access any field of the associated Account.

[Select Account.Name,Account.BillingCity from Contact]


And what more, you can retrieve data from a relationship to a relationship as well...

[Select Account.Name,Account.BillingCity,Account.Owner.Name from Contact]


So, they can be multi-level....

What's the advantage??

The better you understand relationships, the better you can construct complex nested queries and try to minimize the number of queries used.

Custom Relationship:

This is same as the standard relationship except that the naming convention has some differences...

THE __c and __r :

In our same example, if we create a custom Account look-up field on Contact and name it as CustomAccount... then accessing the relationship is as follows...

CustomAccount__c --> Equivalent of AccountId, holds the ID of the Account.

CustomAccount__r --> Equivalent of Account, holds the relationship

Our example query will modify as below..

[Select CustomAccount__r.Name,CustomAccount__r.BillingCity,CustomAccount__r.Owner.Name from Contact]



Wondering how i came to know about this and where will you find more details on this????

Go to Setup--> Develop --> API and click on "Generate Enterprise WSDL"

The WSDL shows the actual way data is stored, the actual field names, the actual relationships etc...