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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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, …

Continue reading

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 …

Continue reading

HELP ICON symbol NOT showing in Visualforce page

In my previous post(REQUIRED symbol NOT showing in Visualforce page) , I have explained the scenario, in which situation REQUIRED symbol is not shown & how to fix that issue. Here , in this post , there is similary type of situation for HELP ICON. A Help Icon(question mark) is displayed at the Side of …

Continue reading

Colour of pageBlockSection title bar

Few months back, I have client requirement to change the color of pageBlockSection BAR depending upon a condition (If a field value is equal to someValue). Salesforce does not provide any standard feature or any direct method. So to achieve this functionality we have to override the CSS of Salesforce. Note: Do not rely on …

Continue reading

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 …

Continue reading