RSS

Apex pageMessage revealed

Hello Guys,

It was always confusing to understand the various tags salesforce provides for showing message in vf page. Those tags are.

<apex:message>, <apex:messages>, <apex:pageMessage>, <apex:pageMessages>

Below post provides Detailed explanation of each of the tag.

http://jessealtman.com/2013/08/difference-between-the-multiple-messaging-options-in-visualforce/

Advertisements
 
1 Comment

Posted by on March 11, 2014 in force.com, salesforce, TechIssues

 

Tags: , , , , , , ,

Curly vs square bracket

Just wasted 2 hours figuring out the issue with ‘apex:inputText’ element.

Did one mistake. instead of curly bracket ( } ), used square bracket ( ] ) and salesforce started giving me misleading error message i.e. ‘Styleclass’ is already specified for the tag inputtext. While the issue was just a bracket 😀

 

<apex:inputText styleclass=”input pull-left” value=”{!PaymentInfo.payAmount}”></apex:inputText>

<apex:inputText styleclass=”input pull-left” value=”{!PaymentInfo.payAmount]”></apex:inputText>

 
Leave a comment

Posted by on November 10, 2013 in Home

 

Tags: , , , , , , , ,

IsVisibleInSelfService = true :)

I was working on assignment which required me to access Tasks and show on customer portal. I written the apex code and fired SOQL, but to my surprise none of Tasks were fetched. I thought its a permission issue from profile or sharing access issue.

However at the end I found that there is a field on task object called IsVisibleInSelfService which derives the visibility of the tasks for customer portals. Even Apex code can’t find the task if this boolean field is not set to true.

Probably its trivial information but usefull when you are not aware of this 🙂

 
4 Comments

Posted by on April 18, 2013 in Home

 

Tags: , , , , , , , , ,

Quote

To utilize the zipped css or JS in visual force page we need to include them first. which requires special syntax.

    <apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery-1.3.2.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery-ui-1.7.2.custom.min.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.jquery, 'css/ui-lightness/jquery-ui-1.7.2.custom.css')}"/>

For more information go to following page.

http://www.tehnrd.com/setting-up-jquery-with-salesforce-com/

Using zipped resources in Visualforce page

 
1 Comment

Posted by on July 7, 2012 in force.com, salesforce, TechIssues

 

Tags: , , , , , , ,

generate CSV file in SFDC Apex

To generate CSV file through Apex is fairly simple. Following steps will help you to understand it.

  •  Create a Controller and write a method which returns List of items.
public class generateCSVController{
   public List LeadList{get;set;}
    public generateCSVController(){
             //Populate List here.
              LeadList = [select id,name,email from lead limit 10];
    }
}
  • Create a page and associate it with the controller we created in first step.  Set the content type of the page to “text/csv”.
< apex:page controller="generateCSVController" cache="true"  contentType="text/csv#Leads.csv" language="en-US" >"Id","Names","Email"
< apex:repeat value="{!LeadList}" var="L" >
"{!L.id}","{!L.name}","{!L.email}"
< /apex:repeat >
< /apex:page >
 
Leave a comment

Posted by on June 12, 2012 in salesforce, TechIssues

 

Tags: , , , ,

Play snake game inside Youtube video

Yes. You can play your very own snake game inside any youtube video screen. If you are getting bored you can just follow below trick and start playing the game immediately. This trick works in the Youtube site’s video as well as embedded videos.

Image

1) Click on any youtube video to view.

2) you will see waiting gif, while it is being loaded.

3) At the same time press ‘Down” and “Left” arrow two three times.

4) Eventually the waiting gif will convert into snake. and you can control the snake by arrow keys.

Now try the trick in below video. Just click on play and when it shows the loading GIF press “down” “Left” arrows twice thrice and snake game will apear.

Have a nice play 🙂

 
Leave a comment

Posted by on April 7, 2012 in Home

 

Tags: , , , , , , , ,

Uploading animated images on Facebook

I was wondering by the animated images floating around on facebook. AFAIK, facebook tries to stay simple and clean, To provide nice user experience. It has been one of the success factor for facebook in the social networking. However GIF animated images were floating around so I decided to dig in to get what feature facebook has launched now.


After searching for around 1hour, I got to know that it was a security hole in facebook image compression technique which somebody bypassed and it then started spreading. Following is the way to publish animated images on facebook posts.

Upload a small animated gif (about 50 KB or less)as your profile photo (Facebook will flatten animated gifs which are to large, but do not detect the smaller ones). It will then be in your profile’s album. Your icon itself will NOT be animated. However, you will see it as animated in your Facebook profile photos folder, and by going to that photo, & clicking on “share”, it will appear on your wall as animated.

However above technique has stopped working now, since facebook worked on that small bug. Thank god, It might have become an failure point for facebook otherwise.

While searching this URL was useful for me.

 
1 Comment

Posted by on April 6, 2012 in Home, TechIssues

 

Tags: , , , , , ,