Salesforce. AI. Web3
Support of CDATA sections & Apex DOM classes!
I saw this tweet today about the apex-fast-xml-dom library. Unfortunately, it's true that FastXMLDom can’t support CDATA sections as of now. This is because FastXMLDom is a wrapper on top of Spring’10 Apex DOM classes, and DOM classes don’t support CDATA sections.
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.
Invoking “Apex WSDL” Web Services from Apex Code
Apex programming WSDL can be downloaded from the “Setup” area of your Salesforce org. Just land on the “App Setup > Develop > API” page. Instructions to download are shown below:
Tolerado for Salesforce WSC release 1.1 out !
A major release 1.1. is done for Tolerado for WSC APIs today…
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.
HTTP Compression with Apache Axis, a huge performance boost!
As mentioned in my previous post, I was researching/benchmarking on how HTTP Compression with Apache Axis improves performance. The results I got post HTTP compression, are surprisingly amazing…
Debugging Sites Authorization Required Error!
Force.com sites redirects to “Authorization Required” page in case something goes wrong behind the scenes, for ex…
Apex Test data isolation from Org/User’s data.. !
The key to write a good apex test case is isolate test-data from actual org/user data. If your test case in anyway depends on org data, then it will fail for sure in deployments across different Salesforce orgs…
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.
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.
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…