Archive for the ‘Salesforce’ Category
(This is a pretty un-glamorous resuscitation of my blog, but it was fresh on my mind and needed to be shared, so here goes…)
java.lang.OutOfMemoryError: Java heap space
Thankfully I was able to find the solution to this issue on the DeveloperForce discussion boards with some targeted Googling, but I’m hoping that this post will save others from having to encounter the error in the first place and then hack around for a while figuring out how to implement the fix.
The solution to this problem is pretty basic – all you need to do is to add the parameter “-Xmx1024m” to the “$ANT_OPTS” environment variable in your Ant shell script or batch file. (This parameter raises the maximum memory limit for your Java virtual machine to 1GB, instead of 128MB or whatever paltry amount the default is.) If you’re using the default installation of Ant on Mac OS X, you can find the Ant shell script in the “/usr/share/ant/bin” folder. Open “ant” with any text editor (my favorite is the free app TextWrangler) and go to line 322 of the file. Insert “-Xmx1024m” in between ”$ANT_OPTS” and “-classpath”, save the file (you’ll probably need to provide your Mac OS X user account password since it is technically a system file), and you should be all set.
My condolences to the Windows users, as I don’t really use Windows any more, so you’ll have to figure out where that parameter goes. (If someone can post comprehensive instructions for Windows users as a comment, that would be greatly appreciated! I’ll be happy to update this post with the instructions.)
I’m planning to post some more extensive tips and guides on Force.com development and deployment tools (hopefully) in the near future, so please stay tuned!
A few of us die-hard Salesforce and IdeaExchange users and avid fans have formed a LinkedIn Group to enable us to get better acquainted in “real life”, and we would love to have you join us if you are also a user and contributor to the Salesforce IdeaExchange. Here is the link to request access to the group:
The only thing that we ask is that you send us a link to your IdeaExchange profile/Salesforce Community profile, which would look something like this (updated for the new SFDC Community):
You can get to your profile by logging into the IdeaExchange and going to the “My Profile” tab just below the big red “Search” button.
We’ve already started some fascinating and informative discussions in the LinkedIn Group around how & why we participate in the IdeaExchange, and ways that we can improve the community and the Salesforce.com/Force.com platform together.
Hope to see you there!
I’m working on a Salesforce.com SFA CRM implementation that is replacing a Microsoft CRM 3.0, and one of the key things that the users accessed (and heavily relied on) was the Notes view in MS CRM. The Notes view showed the details (subject and comments) of each Note, so the user could see a running narrative of all recent conversations with the customer (they logged all Calls in Notes instead of Activities). The ironic thing was that these notes had been migrated from Salesforce.com SFA Activities (Tasks) several years ago, and I was trying to convince the client to move back to capturing their call notes in Activities/Tasks. However, the standard related list for Activities can’t show the Comments field from the Task/Event objects, so they weren’t too happy about not being able to see the whole narrative in one place. I was about to go down the path of creating a dynamic report link (See “Populate Advanced Filters in a Report from a Custom Link” in Salesforce Help – Solutions), but then I noticed a simple piece of standard functionality that fit the use case perfectly – a simple “View All” button on the Activity History related list:
This provides a nice consolidated view of all Activity History with the Comments field included:
I wanted to make sure to point out this simple but useful functionality, especially in contrast to Microsoft CRM, so that anyone else out there who might encounter a similar requirement would be aware of it.
All too often we overlook some handy functionality because it is behind a button or a hyperlink, or we form “click habits” that cause us to rush through certain familiar interface paths and ignore existing or new features that could improve our efficiency. While this might spark some good discussions on interface design to overcome these tendencies, I still need to remind myself to not tune out interface elements when looking at a page, because they might just provide the answer I am looking for.
I’ve had a number of people ask me “Why can’t I see such-and-such an object in the Apex Explorer when I have full rights to view it?” (usually referring to custom many-many/junction objects), and I thought it would be good to get a blog post out there to explain the cause of this phenomenon and how to correct it.
To start with, I should explain what the Apex Explorer is, because many people are not even aware of its existence. The Apex Explorer is a pretty simple .NET desktop application that functions as a sort of SOQL “Query Analyzer” and a Salesforce.com data model browser. You can learn more about it and download a copy from the Force.com developer wiki.
Only one version of the Apex Explorer was ever developed and released, and that is version 8.0. The reason that they gave it that version number was that it’s release coincided with the release of version 8.0 of the Salesforce.com API. The Apex Explorer was somewhat useful and unique at the time, but I’ve found it to be somewhat buggy when you try to use it for anything more than the most basic queries. [The Salesforce Schema Browser in the Ecplise plugin/Force.com IDE is much more robust as it is actively being developed for each new version of the API, so it is highly recommended that you use it for testing SOQL queries and digging into your Salesforce.com schema structure/data model] For some reason lots of people still use the Apex Explorer (and Salesforce still links to it in Setup > Develop > Tools), probably because it is the only light-weight Windows alternative to the incredibly awesome SOQL Xplorer for Mac OS X. (Now why Salesforce won’t link to the actively developed (and very feature rich) SOQL Xplorer from Setup > Develop > Tools or from the Force.com developer wiki is quite a head scratcher, but I digress…)
Salesforce versions the releases of their API so that integrations built on a certain version of the API won’t break when things are added or changed in the API for new releases. For instance, “Many to Many Object Relationships” were added in the Summer ’08 release (version 13.0 of the API). If you log in with any previous version of the API, you won’t see any Many to Many objects in your schema.
Since the Apex Explorer was created when version 8.0 of the Salesforce API was the current and latest version, it defaults to logging into Salesforce.com with the URL for that version of the API. In order to see new objects in your Salesforce schema that are or have features that weren’t available with version 8.0 of the API, you’ll need to change the login URL that the Apex Explorer uses. Thankfully this is pretty easy to do – open Apex Explorer and go to the Tools menu and select “Options”:
In the Options dialog, all you have to do is change the “8.0″ to “15.0″ on the URL in the “Endpoint” field:
And now you will be able to see your “many to many” objects, new standard objects that Salesforce has exposed through the API since version 8.0, and probably anything else in your schema that wasn’t available with version 8.0.
CAUTION: Using a newer version of the API than this application was originally developed for MAY cause certain parts of its functionality to malfunction. I have NOT tested this application thoroughly with any newer versions of the API, so please proceed with caution, and don’t be surprised if something doesn’t work or worse, the data in your Salesforce org gets corrupted somehow. I would highly recommend that you switch to using the Force.com IDE as your schema browser as it is the only officially supported tool for this purpose.
A while ago there was an Idea on the IdeaExchange asking if the Account Merge wizard could be returned to the beginning. I responded with a simple workaround, but the comment function of the IdeaExchange wasn’t really suited for providing the solution, so I decided to blog the solution here to make it a little easier to read and find, and also provide a new way to implement the solution.
Basically, the solution is just a simple modification to the URL used to access the Account Merge wizard. Most URLs in Salesforce.com accept a “retURL” querystring parameter that tells the page where to return the user once the operation on the current page (or series of pages) is complete. So, the URL that I came up with for this solution is:
The URL lacks any “http://…” because it needs to be relative to your particular Salesforce.com datacenter pod (NA1, NA2, Na3, etc.). Now, the only thing that you really need to do is to take this URL and make a custom link somewhere in your Salesforce org, perhaps on the sidebar or on a page layout, and you’ll have a way to launch the Account Merge wizard set to return to the beginning upon completion.
Next, create your Custom Web Tab (Setup > Create > Tabs), and choose the “Custom S-Control” Tab Type, and associate it with the Custom S-Control that you created containing the code above. Make the tab visible to the appropriate profiles, and now you have an easily accessible Account Merge Wizard that will cycle back to the beginning upon completion.
For those who want to implement a more future-proof solution (Salesforce is in the process of phasing out S-Controls over the next few years), you can easily implement a VisualForce page that accomplishes the same thing using the following code:
Then create a VisualForce Tab that references the page you created, and it will work just like the S-control solution above.
Some have asked me why I love Salesforce so much, and why I spend such a great deal of time submitting, commenting, and voting on Ideas on the IdeaExchange. Here is a list of the primary reasons that motivate me to invest so much in this community:
- To me, Salesforce.com is one of the most revolutionary platforms ever to come into the information technology marketplace. The power that it gives average users to structure, capture, and analyze data is trule remarkable. It is something that I haven’t seen anyone else match or beat to date. With every release, the need for writing code to build robust applications is remarkably diminished, and the efficiency with which custom applications can be deployed is also remarkable and unmatched in my experience. I want to help this great platform become even better, and eliminate any obstacles to adoption that I uncover.
- The IdeaExchange was the first community I ever encountered where it was clearly accessible and encouraged to submit concepts for product improvement to an organization, and easily share those concepts with your peers in the community so that they could promote them as well. I had been looking for an outlet like this for many products that I was passionate about, and discovering the IdeaExchange was tremendously exciting. Salesforce was the first company that I know of to offer a product focused on this amazingly simple but powerful paradigm, and has been the most successful by far in helping other companies implement this model.
- I have been privileged to consult with a large number of Salesforce customers, users, and administrators, so I hear a number of unique feature and enhancement requests for the Salesforce.com platform. Most of these people are not ready or interested in participating in the IdeaExchange, so I feel a responsibility to make sure that their Ideas are heard and promoted. Because I spend so much time on the IdeaExchange, I can also give customers and users some insight about what Ideas have already been submitted, and the likelihood or timeframe in which those Ideas might be implemented.
- Participating in the IdeaExchange (or any Ideas community that has such positive momentum) is increasingly rewarding, as it enables you to connect directly with other users, partners, and product owners that you would likely have never interacted with in other types of communitites. It also gives you a greater sense of ownership in the community, because you are contributing something that the group can objectively identify as valuable.
I’ve really been amazed at how rapidly the IdeaExchange community has grown and the amount of impact that it has had on the Salesforce.com/Force.com platform. I’m looking forward to seeing how it continues to evolve!