Salesforce Blogs

Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

JSON Parsing in Apex can be a Developer’s Nightmare!

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…

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

HTTP Compression with Apache Axis for Salesforce Web Services!

I have been speaking a lot about using WSC above Apache Axis, but today I found an interesting old post about HTTP compression with Apache Axis. This is interesting because it can boost performance for those who are integrating with Salesforce web services using Java Apache Axis.

Read More
Abhinav Gupta Abhinav Gupta

Deep Dive: 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.

Read More
Engineering Abhinav Gupta Engineering Abhinav Gupta

Working with Aggregate SOQL queries/results in Batch Apex!

What if you want to create a Batch Apex Job that uses SOQL having aggregate functions like SUM, MAX, and COUNT on top of results grouped by the “GROUP BY” clause? You can’t easily create a Batch job via QueryLocator, as shown below. When working with Batch Apex in Salesforce, you might encounter a scenario where you need to run SOQL queries with aggregate functions like SUM, MAX, or COUNT while grouping results using the GROUP BY clause.

Read More