Skip to main content

Posts

Showing posts from January, 2014

Add/Remove Functionality in a VF page for Creating Multiple Records For a Particular Object.

Hi Guys This is a very simple post. I had come across a scenario where I was asked to develop some functionality where user can create list of records at a time(clicking on save button on one time) and can remove row. Here I have created a pageblock table and there I am displaying 5 rows to enter data and there column, Name , Phone and Action. In Action column Delete link is present.When that link(Delete) is clicked then particular row will be removed. Two button is there Add Row and Save. Add Row-->  When that button is clicked one more row will be created in the pagablock table Save--> It will save the record. Here is the page <apex:page controller="creatingListOfRecordsController">     <apex:form >              <apex:pageBlock title="Creating List Of Account Records">         <apex:pageMessages></apex:pageMessages>             ...

Encryption and Decryption In Salesforce.

Encryption , is the process of changing information in such a way as to make it unreadable by anyone except those possessing special knowledge (usually referred to as a "key") that allows them to change the information back to its original, readable form. To encrypt some value we have to use some key value that can be hard coded or we can generate key also by using this  Blob cryptoKey = Crypto.generateAesKey(256); We have to use same key to decrypt that value. Here I am going to share some code.Hope it will help you. I have created one visualforce page and one controller. In the page only one field(Name) is there and two button(Save & Update). When some value is entered in the name field and clicked on save button that value will be stored in the object encrypted format. Now record id in the url and click on update button encrypted value will be converted in to original format. Here is my page <apex:page standardController="EnCrypt_Decrypt__c" ...

Extend Feature Of Salesforce to Salesforce

Salesforce to Salesforce is a Force.com feature that lets you configure two Force.com environments (orgs) so that they share data records in real time. It is useful for those salesforce org who does business with partnership. While doing business It might required to share business data. if both org use salesforce then Salesforce to salesforce feature is easy to use for sharing data.  As name suggest only this feature(S2S) only  used by Salesforce Org.   How to use Salesforce to Salesforce ? Enable salesforce to salesforce features in both the Org.(Source Org and Target org) Create one Account and Contact in Source Org and provide email address(which is  associated with target salesforce org. ) Now Create a Connection record from tab list. Choose Contact Name(which you have just created ) Send invitation  Check mail, Activate connection Choose object whose record you want to send and Save it  Click on Edit link next to Object name in...

Navigating to Standard Layout(Tab, Edit layout,List Layout) Using Action Global Variable

$Action is a global variable.  A global merge field type to use when referencing standard  Salesforce  actions such as displaying the Accounts tab home page, creating new accounts, editing accounts, and deleting accounts. Here I am sharing some visualforce code for the same. <apex:page standardController="Account">        //Navigating to new record page of Account        <apex:outputLink value="{!URLFOR($Action.Account.New)}">                Creating New Account        </apex:outputLink>       //Navigating to Account list View        <apex:outputLink value="{!URLFOR($Action.Account.List, $ObjectType.Account)}">               Go to the Account List View       </apex:outputLink>       //Navigating to Account tab page   ...