I'm trying to create static resource json file (with metadata api) on after install script, that runs after Managed Package is installed. The issues I faced so far are:

  • one can't run metadata api callouts directly from afterinstall script (future method seems to be the way to go).
  • there's no session ID in postinstall context

Taking that into account, is it even possible to create a static resource from after install script?

  • Any specific reason to create static resource? Why not include it in the package it self. Commented Aug 4, 2016 at 9:37
  • Static resource included in the package can't be modified later, and that's one of the app's requirements. Commented Aug 4, 2016 at 9:38

1 Answer 1


I ended up with creating Post Install Instructions page, that registers remote site setting for metadata API and then creates the Static Resource. Of course one could also redirect to the same page from the app tab. I don't think there's any better way to achieve that for now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .