MK Partners Archive for July, 2008

Fixing the Eclipse Memory issue

A few weeks ago I upgraded to eclipse 3.4 and the latest version of the Force.com IDE. Since then I have been constantly plagued by Out of Memory errors and have not only experienced extreme frustration but also decreased productivity. Last night while migrating configuration from sandbox to production I finally got fed up with it and decided to take some action. After scouring various posts on message boards I came across this thread indicating that the following three parameters should fix the problem:
-vmargs
-Xms128m
-Xmx512m

Before editing your eclipse.ini file (located in the folder containing the eclipse executable), you should make a backup copy, just in case something goes wrong (which is unlikely). Once you edit it, you’ll probably already see the -vmargs parameter. You might also see the -Xms and -Xmx parameters but set to different numbers. If you do see them, change the numbers to those above. If you don’t see them then add them. Save the .ini file and launch eclipse, and forget about your memory problems.

Appirio Contact Sync for Salesforce and Google Apps

A while back I wrote about syncing my Calendar across Salesforce and Google Apps. Since then, Appirio released additional some additional functionality, Contact Sync for Salesforce & Google Apps as well. I’m also using the previously mentioned NuevaSync to extend this to my Windows Mobile phone. While I really like this functionality in concept, it’s been a little tricky getting it to work right in practice.

My first attempt at syncing created a very large number of private Contacts in Salesforce, most of which had no business being there. Similarly, some contacts in Salesforce that I really don’t need in Gmail or my phone got synced as well.

I fixed the private Contacts issue by using Appirio’s built-in Google Contact filter functionality to exclude email addresses at non-business related domains like hotmail, gmail, yahoo, etc. For the most part this worked, keeping friends and other non-work related contacts out of Salesforce. There is functionality to sync with just a Group in the Google Contact list, but I haven’t tried that yet. The real solution would be the ability to control which contacts are in my Google Contact list, but that’s not available yet.

I then setup a new picklist called ‘Sync’ on Contacts with values of Yes and No. I set the Salesforce Contact filter to only sync Contacts with a value of Yes. This worked really well and I’m no longer seeing former clients or non-primary contacts at clients in Google or my phone.

Overall, it’s been a much rougher ride than the Calendar Sync. I still have some duplicates and private contacts to resolve, but it’s not an overwhelming amount. Appirio has been very helpful in the process and has provided quick responses to all of my questions and in the long run I think it will all be worthwhile to have my Contacts synced across all three services automatically on a daily basis.

Testing Web-to-Case/Lead in Sandbox

Recently we created a rather complex Web-to-Case process for a client that involved sending out via email Web-to-Case forms that contained hidden fields which were used to assist processing by Apex code upon submission. Other than an issue with Outlook 2007 not rendering forms, the process worked out amazingly.

During testing, we ran into a minor design flaw in Salesforce. When you generate Web-to-Case/Lead html in Sandbox, the URL provided in the code is test.salesforce.com. In reality it should be tappx.salesforce.com or csx.salesforce.com (replacing x with the actual number of your server). It’s a minor oversight, but when testing out complex processes, it’s important to test every aspect in sandbox before deploying to production.

Special thanks to Pritzl for posting about this on the discussion boards.