function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aiden ByrneAiden Byrne 

Exceptions as app is not deployed

Our app on App Exchange is fairly straightforward to install. When the install has finished, our documentation calls for admins to "deploy" the application. Many miss this step. 

 

We have triggers on some standard objects. If the admin doesn't do the deploy step, the following exception is often thrown from these triggers;

 

caused by: System.UnexpectedException: No such column 'WVWhichAccountAddress__c' on entity 'Wherevantage__WVAdministration__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.  In this instance, it is not visible to the user because the custom object has not yet been deployed

 

The error is fairly clear - the field is not visible as the custom object has not yet been deployed. Even if the app appears to be usable for folks granted access, we still want to make sure that the triggers above run OK, regardless of which user takes an action that results in trigger invocation.

 

I can't imagine that we are the first folks to hit this. Does anyone have recommendations around best practices for dealing with this case? At the moment, the exceptions above can lead to other processes failing. In this case, an admin will typically uninstall the app, not realizing that a "deploy" would have resolved the issues.

 

I could swallow the exceptions in the trigger, but this leads to another case that the app is never deployed and our triggers don't get an opportunity to do necessary cleanup in some cases. Any guidance is appreciated.

 

thanks!

Aiden

EJWEJW

We've encountered this issue as well.  In our case we've just documented this as a step in the installation process of the app.  Idealy we'd prefer a change to the installation process or a more obvious indicator for users to recognize when the application is not deployed.  This is usually a problem when users don't read our install guide (which is very common) and the install takes long enough that they're sent an installation complete e-mail rather than an install complete screen that prompts them to deploy.