Monthly Archives: September, 2013
Displaying ChildObjects and Handling Duplicate Entry in Child Section
Well, This post is regarding Salesforce to Salesforce(S2S) Migration. We know that by S2S we can migrate data from one salesforce organisation to another organisation. There is a standard salesforce functionality to achieve this. But through this standard feature we can migrate very limited data(Max 200 records) per request. So a requirement came up to …
Code coverage for interface
We create test class for unit testing, And trying to cover almost all the lines of a class. But for interface we can’t easily create test class and cover the interfaces block lines.But there is no need to worry,because: 1. The interface itself will have 0% coverage. This is because there are no lines to …
Collapse PageBlockSection by default on page load
In a normal Salesforce VF page, the PageBlock Section is not collapsed at the time of page loading. But some times we want a pageblock section to be collapsed by default at the time of page loading. We can do this, with some tricky javascript. We have to call a javascript function that is a …
Generate CSV file in salesforce apex
I have faced an issue when I was generate CSV file from apex class. The issue is small but we need to take care of that if we are trying to get CSV file from salesforce code. I have iterate the object list over the apex:repeat in VF page and put the values from that …
Salesforce UI styles with a custom html table
Sometime we need to create table in visual force page with html elements with same look and feel as standard pageblocktable. So we did not need to add extra style class in html table. We can do it with the standard style classes. We need to do a little work to search the standard class …
auto-populate the “Additional To” field when sending an email by “Send Email” Button on activity History
Few days back , I have a client requirement to “auto-populate the additional to field when sending an email by “Send Email” button click on activity History Related List of a Custom object”. Actual need is to populate “To” field , but I could not able find any solutions for that. After doing google search, …
ZipCode Formatting in Apex
We often face the problem of Formatting ZipCodes for different countries as the format varies from one country to country, We have a requirement for formatting according to the US-ZipCode formats. Here is the following: Canadian-ZipCode Formatting will be like the following For your information. Here we can find a list of Postalcodes for all …
Handling extra spaces between fields kept inside pageBlockSectionitem in VisualForce page
Hello everyone, This may sound very simple. Indeed SIMPLE !! But only once we get over it. We often came to some requirement that on the basis of some picklist selection we have to display some other field in the same visualforce page. I do had similar requirement and it can be easily done using …