Skip to main content

Questions tagged [postinstall]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

is that possible to check current managed package version name on post install script

When upgrading managed package, i need to check current pacakage version name contains BPM then i need to remove picklist values using post install script. how to check current pacakage version name? ...
Afrose ahamed's user avatar
3 votes
2 answers
169 views

Is there a way to deploy a Lightning App in a managed package that would be visible to all users by default?

My second-generation managed package deploys metadata for a Lightning App (CustomApplication) that has a Lightning Tab (CustomTab) with a Lightning Web Component. It also deploys a PermissionSet which ...
nstuyvesant's user avatar
0 votes
0 answers
40 views

Second generation Managed Package - ConnectedApp isAdminApproved and permissionSetName

For our second generation managed package, I hoped to pre-configure the ConnectedApp like this so our Permission Set is associated: <?xml version="1.0" encoding="UTF-8" ?> &...
nstuyvesant's user avatar
1 vote
0 answers
70 views

Second Generation Managed Package Post-Installation Configuration UI on a Lightning Tab

Have read about limitations that package settings (such as in a PostInstall Apex class) for second generation managed packages (like this one Is it possible to programmatically change connectedApp ...
nstuyvesant's user avatar
1 vote
0 answers
42 views

Triggering Scheduled Job During Unlocked Package Installation/Upgrade

Within our unlocked package, we have implemented a class TimesheetWindowScheduler that implements the Schedulable interface. This class is responsible for executing specific tasks. public with sharing ...
vctqs1's user avatar
  • 95
2 votes
0 answers
71 views

Scheduled Job via Apex in PostInstall Class - Can we set the user?

When adding a schedule job via Apex in the PostInstall class of a package (via System.schedule), the job gets submitted by the package (ghost user), not a user in SFDC. Is there a way to specify which ...
Justin Ryan's user avatar
-2 votes
2 answers
170 views

Getting Error: first error: CANNOT_MODIFY_MANAGED_OBJECT, Cannot modify managed object: entity=ObjectPermissions, component=null, state=UNMANAGED: []

I am getting the below error while installing the managed package, and the post installation script is running. First error: Insert failed. First exception on row 0; first error: ...
yash patel's user avatar
3 votes
1 answer
148 views

Clean data From deprecated field in Managed package

Context: I have a managed package and I removed a field from the latest version of the package. Now Although the field is not part of package the customer org still has the field and relevant data in ...
Anmol Kumar's user avatar
  • 3,631
3 votes
1 answer
201 views

How Do We Test PostInstall Script That Makes PermissionSetAssignment?

I'm missing something obvious but we have a PostInstall script that makes a PermissionSetAssignment to the installer to give an Admin permission. The test class is failing since, as is documented in ...
ddeve's user avatar
  • 1,606
2 votes
1 answer
225 views

sObject type 'CronTrigger' is not supported in PostInstallScript

In my PostInstallScript I want to delete a Cron job but I got this error : The pull upgrade of your package failed. Here are the details: Error Message: common.apex.runtime.impl.ExecutionException: ...
MBehtemam's user avatar
  • 121
0 votes
1 answer
304 views

Enable Change Data Capture via Apex

As part of a second-generation managed package, need to enable Change Data Capture (CDC) for the Opportunity object. Can this be done via Apex in a PostInstall for the managed package? Been Googling ...
nstuyvesant's user avatar
0 votes
0 answers
72 views

InstallHandler Scheduled Apex not Running

I have an installHandler running post install to create a scheduled Apex job that runs a batch Apex operation to an AWS S3 bucket. I am able to run the batch operation and run the scheduler using the ...
bswartz's user avatar
  • 27
1 vote
0 answers
158 views

Two Post Install Exceptions occurred while installing Health Cloud

We are installing Health Cloud into a new, clean org. The pre-installation steps were carried out prior to the installation, ie Chatter enabled, Contact to multiple Accounts, etc. After the ...
Andrew's user avatar
  • 11
0 votes
2 answers
136 views

From post install script weird error: Not Serializable: System.Version stack trace External entry point

I execute a post install script and sometimes a weird error is happening: Not Serializable: System.Version stack trace External entry point I don't understand what is going on since looks like the ...
Patlatus's user avatar
  • 17.2k
0 votes
1 answer
32 views

Can I setup custom buttons on Contacts page using post install script? And remove it using uninstall script?

Can I setup custom buttons on Contacts page using post install script? And remove it using uninstall script? I would like to remove the buttons administrators have setup during installation of they ...
Birey's user avatar
  • 121
0 votes
1 answer
51 views

Visualfoce pages in profile are not added to profile after installation

How do I add permission to access visual force pages for individual profiles? Those profiles will be selected at the time of installation and I am expecting the pages I include in the profiles in the ...
Birey's user avatar
  • 121
0 votes
0 answers
47 views

PostScript Install not sending e-mails after failed callout

I have created a post-install script that sends a request to a web server. If the server response's status code is not 204, the script should send an e-mail alerting me about that. The problem is that ...
Igor L. Vicente's user avatar
0 votes
1 answer
115 views

InstallContext isPush method cause Install Package Failed

In my managed package, I create a PostInstall class, in onInstall method, I have follow code: global void onInstall(InstallContext context) { if (context.isPush()) { } When install ...
GhostLee's user avatar
0 votes
1 answer
142 views

When callout is made inside a Post-Install script, it fails with uncommitted work pending

When callout is made inside a Post-Install script, it fails with the error You have uncommitted work pending. Please commit or rollback before calling out If we run the method Limits....
Patlatus's user avatar
  • 17.2k
6 votes
0 answers
324 views

Debug Logs for PostInstallHandler SuperUser

I have a PostInstallScript (without sharing) that schedules a job which I need to see in Debug Logs. However, the job is run under SuperUser mentioned in this question. I have gone through the answer ...
Mariia Illarionova's user avatar
0 votes
1 answer
355 views

Execute postInstall externally

Is it possible to execute Post install script (which implements installHandler) again after the package is already installed using execute anonymous window? Background: after sandbox refresh, ...
sandroid's user avatar
3 votes
1 answer
227 views

Best way to detect that code is running in InstallHandler context?

Implementing an InstallHandler allows a managed package to execute setup Apex code on install or upgrade of the package. I'd like to have some unrelated code - a trigger - behave differently for this ...
Keith C's user avatar
  • 136k
0 votes
0 answers
88 views

Inserts of ObjectPermission or FieldPermission fail in an InstallHandler - is there an InstallHandler alternative?

Code that inserts ObjectPermission and FieldPermission SObjects through normal insert calls (on a permission set that is also created) works fine in unit tests and through the developer console. That ...
Keith C's user avatar
  • 136k
2 votes
1 answer
701 views

Getting 'Insufficient Privileges' Error in Post Install Script when inserting PermissionSetAssignment records

I have requirement like in managed package, we have a custom field on Contact Object. We need to grant the edit access to this custom field for all the users who have Create access on the Contact ...
Pratap Jadhavar's user avatar
0 votes
1 answer
438 views

Postinstallation Action in Unlocked Package

To my dismay I find that, according to the documentation, post-install scripts are not supported for Unlocked Packages. Now I am looking for a (hopefully comparably painless) way to make up for that ...
willeg's user avatar
  • 313
0 votes
1 answer
155 views

upsert failed, pushtopic with this name already exists

I'm testing a post installation script, but I'm having a problem. depending on the previous version, in my script I do some inserts and upserts of different sObjects. For instance, a PushTopic is ...
joacoiudica's user avatar
1 vote
1 answer
635 views

How can I avoid error "sObject type 'StaticResource' is not supported." in the Post Install script?

I am sampling data inside the Package Post Install script from a Static Resource, but script fails with an error: Error Message: common.apex.runtime.impl.ExecutionException: sObject type '...
Patlatus's user avatar
  • 17.2k
7 votes
1 answer
542 views

Can a 2GP package include a post install page?

The sfdx-package.json allows specification of the postInstallUrl, documented as: None. A URL to post-install instructions for subscribers. First generation managed packages support a post ...
Phil W's user avatar
  • 36.9k
10 votes
1 answer
2k views

Using Metadata API from managed package post-install script

I'm trying to deploy a managed package that will create some new fields on the Opportunity object on install using the Metadata API. The entire code in the callout method below works in my dev org (i....
Harley Pellowe's user avatar
0 votes
1 answer
647 views

How can I write a post install script in apex that creates named credentials?

I would like to understand: If we can write a post install script to create a named credential that is required to be able to view a certain report in the managed package(the report feature that I am ...
juhi juhi's user avatar
0 votes
0 answers
153 views

Adding remoteSite settings dynamically from postInstallScript

I checked this link to add remoteSiteSettings dynamically. Above link suggesting to add visualforce base url to remote site setting first. I am able to insert that without any issues from synchronous ...
AshSFcloud's user avatar
3 votes
0 answers
219 views

Best approach to handling Post-Install script exception

As inspired by this post on when to use try catch blocks, if we have a post-install script for our managed package, what's the best approach to gracefully catching and handling an exception? It ...
Brian Miller's user avatar
  • 5,222
0 votes
1 answer
300 views

Can a Post Install Script be removed from a managed package after being set?

I'm creating a post install script for our managed package, and wanted to test it out in a beta release before going live. I only see an option to set it on the main package page, and from the ...
Brian Miller's user avatar
  • 5,222
2 votes
1 answer
11k views

Error Occurred During Flow Action name not found: null. Need to force Class Compilation?

I've occasionally been running into a problem when installing a managed package I'm creating. A simple Screen Flow where at the end it is using an Action to call into an InvocableMethod I am providing....
Adam Erstelle's user avatar
-3 votes
2 answers
79 views

Trigger the execution of packaged code?

We know we can run a post-install script but if the script fails, it will fail the package install. What other ways can we trigger the execution of packaged code, perhaps manually after the package ...
seeta's user avatar
  • 39
4 votes
1 answer
265 views

Is it possible to pass parameters into PostInstallScript?

The idea is to add parameters to the package installation link, for example: https://login.salesforce.com/packaging/installPackage.apexp?p0=04txxxxxxxxxxxx&cutom_param=some_value And then use ...
Mariia Illarionova's user avatar
0 votes
1 answer
37 views

postInstallScript is not inserting CustomSettings after installing managed package

I have below post install script class which is used to insert a demo login details for our application. global class PostInstallClass implements InstallHandler { global void onInstall(...
AshSFcloud's user avatar
5 votes
0 answers
833 views

System.QueryException: sObject type 'PushTopic' is not supported

As part of our managed package we have a post-install script that inserts push topics to support the integration between our solution and SF. Before today this post install script worked fine. I was ...
Kevin's user avatar
  • 305
2 votes
1 answer
941 views

Adding a post-install script to a second generation managed package

I'm creating a second gen managed package using sfdx and I'm not sure how to add a post-install script. Most information I've come across involves updating the package from within an org. Is this ...
davidpanaho's user avatar
4 votes
0 answers
46 views

A delayed package install skips Post Install Script

After installing our package 10 times, it timed out installing twice and said it would email me with details of the install. It eventually installed after a few more minutes and emailed, but there was ...
Kyle Heironimus's user avatar
3 votes
0 answers
333 views

Managed Package Install takes too long to show Config page

As Post Install Scripts are too limited for my purpose I added a custom Config page to my Managed Package because it displays nicely after the installation is done. The problem is that the ...
Robert Sösemann's user avatar
4 votes
1 answer
419 views

Future method is not invoked from PostInstall script

I'm trying to create a future method that makes a callout, and for some reason it's not invoked when the script is done. postInstallScript.cls: global class postInstallScript implements system....
alechko's user avatar
  • 53
1 vote
1 answer
486 views

Can custom metadata type records be deployed from post-install script?

Looking at limitations of post install script there's no mention of CMDt's, but it also seems like post install stuff does get that much attention and given how many limitations CMDt's have - its wise ...
dzh's user avatar
  • 4,155
0 votes
0 answers
135 views

Throwing Custom Exceptions From Post Install Script

We have created a post-installation script for a Managed Package. As we are using lightning components in my package, the domain must be enabled. In post-installation script, we are checking whether ...
Subathira Nagaraj's user avatar
2 votes
0 answers
102 views

Permissions for a scheduled process initiated from InstallHandler

I've got a managed package which needs to start a batch process from a trigger. In order to deal with subscriber orgs who are also using asynchronous apex, my code tries to start it, then uses a "run ...
Aidan's user avatar
  • 13.7k
2 votes
0 answers
81 views

Show custom post install message

I've create a managed package and based on my question here I'm performing a check on whether My Domain feature is enabled or not. Assuming the check is implemented, I now need to let user know that ...
Demarsch's user avatar
  • 391
0 votes
0 answers
608 views

Populate protected custom setting in post install script

My managed package contains a custom setting and a post install script that populates data in that custom setting. The custom setting is protected. Here is the code - global class PostInstallSetup ...
vishesh's user avatar
  • 763
1 vote
1 answer
2k views

Create remote site setting on post install script

I need to create a remote setting setting with org instance URL using URL.getSalesforceBaseUrl().toExternalForm() on post install script of package installation. Note : URL.getSalesforceBaseUrl()....
Shilpa's user avatar
  • 687
1 vote
0 answers
31 views

PostInstall script disappearing when building package

After specifying a PostInstallScript on a package, then building it, the field disappears while it's processing: It seems that it's not functionally an issue, as when the package is built it's still ...
berry120's user avatar
  • 701
8 votes
1 answer
2k views

How to debug Post-Install script?

We don't get much information on email received by subscriber if Post-install script fails. Problem: Unexpected Error The package installation failed. Please provide the following ...
Pasan Eeriyagama's user avatar