5

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. – Krishna Bidwai Aug 4 '16 at 9:37
  • Static resource included in the package can't be modified later, and that's one of the app's requirements. – Bart Juriewicz Aug 4 '16 at 9:38
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.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.