Wednesday, February 19, 2014

Deleting Salesforce apex classes from production org

Goal Scenario

Some temporary apex classes have been created in production and need to be deleted.

For change control reasons the developer does not have rights to use the Force.com IDE to achieve this.

The production administrator doesn't use Eclipse and only has the ability to do the following:
  • Manual configuration
  • Change sets
  • ANT deployments

Solution


Provide a package for ANT deployment containing only the meta files for the classes to be deleted.

Inside the meta, change the value of the status tag to Deleted.

     <?xml version="1.0" encoding="UTF-8"?>
     <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
         <apiVersion>23.0</apiVersion>
         <status>Deleted</status>

Thursday, February 13, 2014

Force.com IDE - Password Required

Symptom

On startup, Eclipse Force.com IDE sits at "Pre-fetch SObjects" step for a long time, and then asks for username/password.

Possible Causes
Java seems to cause this problem.

First time I experienced it, it appeared that Java had become corrupted.
Second time was immediately after installing a Java update.

Update: this happened a third time and messing around with Java didn't fix it.

It turns out that the  Eclipse proxy settings screen is a bit buggy. A lot of corporate firewalls don't support SOCKS so this has to be disabled. When selecting Manual settings, it appears to be impossible to disable the SOCKS proxy settings. However selecting the setting and clicking Clear seems to fix the problem.

http://stackoverflow.com/questions/5857499/how-do-i-have-to-configure-the-proxy-settings-so-eclipse-can-download-new-plugin

Possible Resolutions

1. Check and correct Java proxy settings. It appears these can be lost sometimes

Start | Settings | Control Panel | Java | General tab | Network Settings...
Tick Use proxy server and enter the address and port
Click OK until all dialogs closed


If not sure what to use, see your Eclipse proxy settings (Window | Preferences | General | Network Connections)


2. Repair Java
3. If this doesn't work, uninstall and reinstall
4. It may be necessary to go back to a previous version

Monday, February 3, 2014

Windows Phone 8 to Windows tethering issues

Tethering a Windows Phone to Windows is surprisingly more problematic than tethering to iOS/Android. Various problems can occur including BSOD(!!!)

The fix is to enable FIPS (Federal Information Processing Standards) on the connection. The post below is a starting point for resolving issues and describes how to configure the wireless lan without triggering a BSOD and losing  your configuration.

http://waveformation.com/2013/10/02/win8-internet-connection-sharing-with-windows-phone-htc-8x-
fixed/

However this only works if there has been one successful tether to the phone in the past, as the fix is dependent on the existence of network "profiles" and "interfaces".

A solution that gets around this is to:

  1. Boot the PC into Safe Mode with Networking. See the link for how to do this for various OS versions http://www.computerhope.com/issues/chsafe.htm
  2. Tether to your phone. You'll get an annoying Limited Connectivity message, but the PC shouldn't crash
  3. Right-click your network connection (in the System Tray) and select Properties | select Security tab | click Advanced Settings | tick "Enable Federal Information Processing Standards (FIPS) compliance for this network" | click OK until all dialogs are closed
  4. Restart Windows into normal mode

Wednesday, November 20, 2013

Salesforce Apex: An unexpected error occurred

I got this when I defined a for loop as follows:

for (i=0; i<collection.size(); i++)

The fix is to correct the definition as follows:

for (integer i=0; i<collection.size(); i++)

Saturday, November 16, 2013

Epson Status Monitor disappears after installing Windows 8.1

Problem

After installing Windows 8.1, the Epson Status Monitor disappeared. Selecting Printer Preferences would bring up the unhelpful generic Windows info.

The Epson Status Monitor is a rather antiquated piece of software that is still used with the latest Stylus range of printers. Without it, you can't check ink levels or get detailed information about printer errors.



Solution


  1. Open Devices and Printers
  2. Right-click the printer and select Printer Properties
  3. Click the Change Properties button
  4. Select the Advanced Tab
  5. In the Driver dropdown, change the selection to use the correct driver. In my case, I had to switch from "Epson ESC/P Standard 3 V4 Class Driver" to "EPSON NX130 Series".


Friday, August 16, 2013

Disabling windows profile quota

Windows profile quota can be a real pain as it prevents you logging off until you have reduced your profile size. This can be incredibly inconvenient if you're in a hurry for something.

Go to the link below for some options to get around this problem.

http://realfixes.blogspot.com/2010/03/you-have-exceeded-your-profile-storage.html

Thursday, July 4, 2013

Salesforce Classic (Mobile) metadata not updating

Problem


App metadata is out of date and won't update, even if a full Refresh All Data update is done

Possible Cause


Subtle data corruption

Resolution


Perform an erase and reload as per instructions in KB5282

This KB describes serious corruption, but my experience is that the steps described solve this problem even if there is no visibly corrupted data.