Salesforce. AI. Web3
Visualforce Code Templates/Snippets for Force.com IDE!
Force.com IDE is already doing a decent job on top of Eclipse. It provides a nice Visualforce editor with syntax highlighting and code indentation based on the standard Eclipse HTML Editor. I recently tried to create a couple of Visualforce code templates/snippets to quickly assist in creating the pages and was successful in that attempt. The rest of the post describes how.
JSON parsing in Apex, a developer’s nightmare :( Winter’12 release I badly need you !
Today I stumbled upon a requirement to parse JSON in Apex. I was happy about the fact that I know there is a cool open source library calledJSONObject, that will do all the heavy lifting of JSON parsing and another more cooler native JSON parser is lined up in coming winter'12 release…
Dependency Injection for ease in Testing Apex WebService Callouts!
Dear Apex developers, who are using HTTP Restful Classes know that testing the callouts is not allowed in Apex. People came up with their own smart ways to handle this restriction.
Apex inheritance – Extending managed package abstract/virtual classes & interfaces !
n my recent project, I came across a requirement to create a base class in a managed package with child extension packages would extend to add their value to it…
Calling Marketo SOAP API from Salesforce APEX Classes !
We know about Marketo and its having a deep Salesforce integration. Recently I came across a new requirement to call Marketo SOAP API from Apex. You must be thinking this process is pretty straightforward…
Preparing for Salesforce AppExchange Security Review!
This post is for guys who are planning to release their app on App Exchange and are looking forward to clearing the security review in one shot! This post aggregates all the good links and information you should have in hand.
Force.com ESAPI: A Key to Simplifying Apex Security Compliance!
While fixing security issues for a customer, I came across a very interesting and powerful security API from Salesforce, i.e., Force.com ESAPI. As per the Google code description, this API…
How do you read cookies set by JavaScript in the Apex/Visualforce controller?
This might be a requirement, if you are developing some complex navigation…
Is Javascript Remoting == ViewStateLess Visualforce ?
Javascript remoting is one of my favourites from Spring’11 release and I’m constantly thinking of making best use of it in Visualforce. I believe remoting is the way to make Visualforce more "viewstate less", this post shows a POC of a complete functional example of a page that searches and updates accounts using Remoting only i.e no viewstate…
Javascript Remoting & jQuery Templates: An Easy Way to Rich and High-Performance Interfaces!
Since the release of the Javascript remoting feature in the Spring’11 release, I was super excited about it and was looking for spare time to play with it. A few days back I read about jQuery templates; that’s an awesome jQuery plugin (soon going to be part of jQuery Min)..
Apex API String.format(); Exploring Good & Bad Parts!
I recently came across this useful and under-documented Apex String API, i.e. String formattedString = String.format(String template, List<String> arguments)
String.format(..) is again based on the Java MessageFormat class; its documentation says: Treat the current string as a pattern that should be used for substitution in the same manner as apex:outputText.
Salesforce WSC added support for Session Timeout handling!
Retrying web service call failures/exceptions is important because not every exception means it’s the “end of the world." There is always some hope for some exceptions, like Session timeouts or Invalid session IDs. One can always renew the session (if credentials are available) and make those failing web service calls work again.
Debugging Sites Authorization Required Error!
Force.com sites redirects to “Authorization Required” page in case something goes wrong behind the scenes, for ex…
Winter’11 Setup/Logout in dropdown, inspired from Facebook ?
Winter’11 gave an interesting new location to popular links like “Setup” and “Logout”. They are no longer one click available, you have to click your login name in new interface header to see these links. In first appearance I thought its fine. But over the time when I was working in my winter’11 pre-release org…
Editing Custom Labels in Force.com IDE !
Custom Labels are key to create multilingual Salesforce apps. Developers usually move their page/class to Custom Labels in two steps…
Deep Dive into Static Context in Visualforce Apex Controllers!
Apex static is always confusing for me. I am from a Java background, so it took a while for me to really understand the differences between Apex and Java static. This post discusses apex controller static behavior, i.e., in relation to Visualforce only. Here by Apex Controller static, I mean static variables/blocks declared in the controller associated with a Visualforce page.
Deep dive into Visualforce <apex:actionregion /> tag !
<apex:actionRegion /> is interesting and somewhat ignored tag in Visualforce. Tag is ignored, because Visualforce documentation is not in depth, to explain the real utility of this tag. So this post explains some stuff around action region to make it easy for developers to understand…
Batch Apex & First error: Attempt to de-reference a null object !
I stumbled upon a strange Batch Apex issue today. My batch job was going well in few SFDC orgs; after deploying the same to a new org it stopped working completely. I just see, “First error: Attempt to de-reference a null object” in debug and apex logs. After adding a lot of debug statements in both start() and execute() method, I found that…
Sorting Apex classes SObject using apex-lang code share project!
You must be stuck up with Apex, when sorting is required on instances of user defined classes and pre-loaded Sobjects. Unfortunately standard Apex API just gives a method List.sort(), that just works with primitive data types…