Skip to main content

Posts

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 , Force.com canvas, New formula Return Type ,  Restrict 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   salesforce.com   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 creat...

Creating Test Class to Cover RecordType

Hello  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' , recordTypeId=rt.id);    INSERT con; ...

EmailService In Salesforce

Email services are automated processes that use Apex classes to process the contents, headers, and attachments of inbound email. An email service is a system in Salesforce.com that gives you an email address to which you can send emails that you want to be handled by Salesforce.com in some way. The "handling" of the email is through custom APEX code that gets executed when an email is received at that address. At first we need to create an apex class which will process the incomming email. From incomming email all the information entered are processed here.From that information salesforce automatically creates record.The object in which salesforce will create record will be defined in this class.This class must implements  Messaging.InboundEmailHandler interface . So this class will look like in this way global class myHandler implements Messaging.InboundEmailHandler {        global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail emai...

Dynamic Field Binding in Salesforce

This tip is useful when we are going to display different field for different users . We can avoid non empty field from displaying in visualforce page by using rendered property.   We can write  rendered="{!IF(NOT(ISNULL(Field)),true,false)}". If field has some value then condition becomes true , that means rendered is true . So field is displayed .  Its a simple one , then  what is the use of this tip ...?   Suppose we have 20 fields in an object and an user wants to display those fields which has some value . So we will do easily using rendered property . But we have to write rendered property in every field . is not this a clumsy one...?  We always write short code satisfying our requirement . what If we use that rendered property only once to solve our requirement. is not it easy...?   Here is my page code...   <apex:page controller="Renderfieldcontroller">   <apex:...

Hiding header and Sidebar in Salesforce

some times we need to hide header and sidebar of a visualforce page or standard layout. we can do it by writing showheader = "false"  and  sidebar = "false"   in the visualforce page. for example  <apex:page controller = "TestController"   showheader = "false" sidebar = "false">    // your information  </apex:page> How can we hide in header and sidebar standard layout ? ans- Salesforce is user friendly language, There is also a feature available so called "Enable Collapsible Section", By using this we can only hide sidebar you can go in this way Name-->set up-->customize--> user interface--> checked the check box " Enable Collapsible Section" , after that you can show or hide sidebar. If someone wants to hide both sidebar and header of standard layout, then how will we do it?  Ans- It is very simple, just append " isdtp = vw " at end of link in the URL, yo...

Disabling Checkbox Inside PageBlockTable

Hi All I had come across in a requirement,the Requirement  was to select one record and disable all the records after selecting in that table. I have done it by using JavaScript, I think it will help you. This is the page. <apex:page>      <apex:form>             <script>                    function checkboxuse(tag) {                         var menus  = document.getElementsByClassName("Teststyle");                         if (tag.checked == true) {                              for (var i = menus.length - 1; i >= 0; i--)                              {      ...

AutoSave Feature In Salesforce.

This feature is very much essential because sometimes  user might accidentally close or navigate to some  other page.That's why we need to save data.I have implemented javascript and actionFunction to get AutoSave features... This is my page. .. <apex:page StandardController="Account" extensions="savecontroller">      <apex:form >          <apex:pageBlock >          <!-- The action function which calles the Apex function 'autosave' -->               <apex:actionFunction name="autosave" action="{!autosave}" rerender="out" status="savestatus"/>               <!-- A status denotion of the update -->               <apex:actionStatus id="savestatus">                   <apex:facet name="start"> Auto Sav...