You need to sign in to do that
Don't have an account?
Hithesh Saicharan
I want to load some into into an object after a package got installed. I tried post install script but seems post install script will work only for 2GP Managed packages and not for Unlocked Packages. Is there a way I can load data into an object once my unlocked package got installed?
Load data into custom object after Unlocked package installation
I want to load some into into an object after a package got installed. I tried post install script but seems post install script will work only for 2GP Managed packages and not for Unlocked Packages. Is there a way I can load data into an object once my unlocked package got installed?
I have come across related posts like this https://salesforce.stackexchange.com/questions/184674/can-we-have-a-post-install-script-for-unmanaged-package?rq=1 wherein it confirms that post-install script is only available for managed packages.
You might want to try the workaround mentioned :
add a class with a static method to the unmanaged package and then run the method anonymously in the developer console post install...
Install the package with the class included and then open the execute anonymous apex window and run:
MyUnmanagedPackagePostInstallScript.doSomething();
If this information helps, please mark the answer as best.Thank you