1

How do I run postinstallscript from anonymous window to check if it is working or not?

I am trying to install a package to another org where it is failing with below error.

Unexpected Error The package installation failed. Please provide the following information to the publisher: Organization Name: prime.com Organization ID: 00D6F000001GQCU Package: accpack Version: 1.0 Error Message: The post install script failed.

Scenario:

Created a custom field on contact object. Now I am trying to package and trying to install into another org.

In my post install script I am trying to assign this custom field to contact page layout in the installed org where it is failing.

Please help me on this.

  • Apparently, if you specify an Apex Exception user for your package, you should get the error by email. Have you set this value? Did you get an email? You can't run a script like that in execute anonymous, you'd have to use a unit test. Did you write a unit test for it and verify? – sfdcfox Nov 28 '18 at 8:08
  • it will be also wise to check following quesions to see all hidden "gems" of post install process -- salesforce.stackexchange.com/questions/32607/… – kurunve Nov 28 '18 at 8:10
  • @sfdcfox -- Yeah, written the test class and its working fine .. but when I am trying to install to other org its failing – jaya krishna Nov 28 '18 at 8:13
  • @jayakrishna did you check your email for a log file? Did you configure this setting? Is this a "real" org you're testing in, or a Sandbox? If you want, you can post your code here (if you can), it may help us help you identify the problem. – sfdcfox Nov 28 '18 at 8:17
  • @sfdcfox -- it is my trail org .. can you please let me know how can I configure this – jaya krishna Nov 28 '18 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.