Friday, 19 July 2013

Summer13 Release Notes For Exam

Hi Guys 
Today I have cleared Summer13 release exam , Now I am sharing some important topic for your help.
Before going for the exam make sure that you know about Salesforce Communities , canvas, New formula Return TypeRestrict to Visitors to Site,  
Sandbox template. Improved Setup user interface and Enhanced Report and Dashboard Folder Sharing.
Please go through this only once You will find all the questions from this only.The text which are red are most important one.

 Improved Setup user interface

  • The setup menu items are organised into goal-based categories
  • Administrators can enable or disable the new setup user interface at any time .
  • Personal settings, which all users can edit, are available in a separate “My Settings” menu. To access “My Settings”, click your name at the top of any Salesforce page, then click “My Settings”.

Salesforce Communities

Now any company can create private social communities to connect with customers, partners, suppliers and distributors in entirely new ways. Salesforce Communities is the only community platform that combines the power of social networking with business processes for breakthrough collaboration and productivity.
  • Salesforce Communities offers:
  • social collaboration for employees, customers, and partners
  • deep integration with sales, service, and marketing business processes
  • custom branding and application development
  • multi-community access
  • trusted security and scalability
  • Customer Portal users and Customer community users can log into a community.
  • Communities can be customized by defining members,tabs, branding and email settings. 
  • Customers can get answers to their product and support questions. 
  •  Employees can connect with distributors, resellers and suppliers. canvas

  • Expose an external Web application on the Chatter tab .
  • Embed a Salesforce page in an external application . 
  • The canvas app appears in the app navigation list on the Chatter tab. If this option is selected, the canvas app appears there automatically. 
  • The canvas app can appear on a Visualforce page. If you add an <apex:canvasApp> component to expose a canvas app on a Visualforce page, then be sure to select this location for the canvas app; otherwise, you’ll receive an error.  


New formula Return Type

  • checkbox for true or false 


Enhanced Report and Dashboard Folder Sharing 

  • Give everyone in a group read-only access to the reports in one folder and read-write access to the reports in another folder.
  • The reports or dashboards in a folder can be shared with an individual user.
  • Different access levels can be assigned to different users in the same folder.  

Restrict to Visitors to Site 
  •  We can restrict visitors for  site by using Ip address, There  are range available we can define that visitor's having this range to this range can use site.


Sandbox template

  • Specify the objects whose data should be replicated in a full sandbox environment
  • Save a template for re-use when creating a full sandbox environment.  

Wednesday, 10 July 2013

Creating Test Class to Cover RecordType

I have come across many times this question how to cover record type in test class,This made me to share in 
my blog.Here is the code you can refer
for example :
let say we have two Contact Record Types PrimaryContact and BusinessContact.
Now  we can create Contact record by using these recordtype  such as PrimaryContact  or BusinessContact .
There are two different approach.

First Approch
 We normally query like this . 

    RecordType rt = [SELECT id,Name 
                             FROM RecordType 
                             WHERE SobjectType='Contact ' AND Name='PrimaryContact '];
And now use this value further while creating the Contact Record.

   Contact con = new Contact (Name='TestConatct' ,;
   INSERT con;

Second Approach
We can do this in other way without query.

     Schema.DescribeSObjectResult cfrSchema = Schema.SObjectType.Contact; 
     Map<String,Schema.RecordTypeInfo> ContactRecordTypeInfo
                   = cfrSchema.getRecordTypeInfosByName(); 
Now to get the recordTypeId we will have to use a method getRecordTypeId. 

    Id rtId = ContactRecordTypeInfo.get('PrimaryContact ').getRecordTypeId(),
Now we can insert Contact Record like 

   Contact con = new Contact (Name='TestConatct',recordtypeid = rtId );
   INSERT con;