Troubleshooting Installation of UnofficialSF Packages

Apex Compile Errors

When you try to install a package you might get some Apex Compile errors like this:

Apex Compile Failure. Apex class FDSegmentation: line 3218 column 24 variable does not exist: NaicsCode 

These errors are not actually related to the package you’re trying to install. What’s happening is that Salesforce is attempting to recompile all of your existing Apex Classes before it installs the new package. This is essentially to make sure that your org is ‘clean’ before making changes to it.

In some cases, you get to choose whether or not to carry out an org compilation:

I have not heard of any problems if the Compile only the Apex in the package is selected.

Alternatively, you can delete or fix the apex classes that are generating test failures. How risky deletion is depends on your situation. Sometimes the class that’s generating the errors is obviously old or obsolete or unnecessary. Salesforce will prevent the deletion of classes that are referenced by other Salesforce metadata, so you have some protection there. You can always try copying the apex code to a separate document before deleting, in case you need to recreate it.

Sandbox vs. Production Issues

One of the most common problems. User clicks on the install link and it won’t install on their sandbox or it won’t install on their production org.

The key to getting past this is learning something simple and powerful: package install links for production orgs always start with ‘login’ and links for sandboxes always start with ‘test’. We often only publish a single install link. So if that install link is something like this:

It will not install onto Sandboxes as is. However, all you have to do is paste the link into your browser and then replace ‘login’ with ‘test’, like this:

You can also go the other direction.

Scheduled Flow Permissions Issues

Learn more here.

More Installation Tips and Tricks