The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
27 views

Unable to update metadata (picklist values etc) after post install script is executed

Once a managed package is released, we have to perform several manual steps such as update picklist values, add field to layout, update field level security etc. And there are around 100's of ...
0
votes
0answers
10 views

Run InstallHandler only if Patch org is created

I am looking for a way to auto-populate patch orgs with data for manual tests and asked myself if InstallHandler classes might be right for that case. Are InstallHandler called at all during patch ...
3
votes
1answer
40 views

How do I distribute Record Type Assignments when packaging Permission Sets?

I'm trying to create a Managed Package that relies entirely on Permission Sets. No profiles! In my head, Profiles are really "owned" by each org administrator. One needs serious justification to ...
1
vote
1answer
26 views

Package : PostInstall script

I'd like to give users the possibility to create sample Data after installing a package, but I want them to do this only if they want, so I don't provide the data creation directly in the ...
0
votes
1answer
32 views

How to write unit tests for a post install script?

I'm trying to write a unit test for a post install script class, a class that implements InstallHandler interface. I'm testing two cases: 1- No previous version is defined, for that I just use this: ...
2
votes
0answers
22 views

How to automatically enable chatter feed tracking in sales force? [duplicate]

My requirement is, we have completed our package installation and tested in another org. in that org Feed Tracking is not enabled for some of custom objects. How can we enable feed tracking for the ...
8
votes
1answer
280 views

Access MetadataAPI via JavaScript

We created an 100% native Salesforce IDE as a Managed Package which is using ToolingAPI and MetadataAPI via APEX. This works fine. But there is one thing which really bothers people after the ...
1
vote
0answers
27 views

Is it possible to query Profiles in InstallHandler script of managed package?

Is it possible to query Profiles in InstallHandler script of managed package. I'd like to get target profile ids to create specific custom settings for them.
25
votes
1answer
438 views

InstallHandler runs under a special ghost user. What rights does it have?

When you install a managed package with a post-install script, Salesforce creates a special ghost user under which all of the post install activities occur. I think this is undocumented. Here are some ...
3
votes
2answers
66 views

Get Organization Type during postinstall

I have a managed package that can be installed in multiple organization types. Attempting to use the following query causes install failure when used in my postinstall script. [SELECT ...
1
vote
0answers
105 views

Error in post-install HTTP request

I'm developing a package with a post-install script. The script makes a HTTP request to my webserver, or sends me an email if an error occured. Every time the script is run, I receive this error: ...
2
votes
1answer
46 views

Trigger a migration batch job from a managed package's install script

We need to replace a field in our managed ISV package with another field. For our software still to work after this change we plan to add a Batch that copies the old field value to the new one. We ...
3
votes
1answer
126 views

Get user input from InstallHandler using VisualForce page

I've a manged package which uses an external API to load some data, and each installation of this package in different orgs require an specific API Key to authenticate against the API. This APIKey is ...
2
votes
1answer
102 views

Using post install script in Trialforce

My company is provisioning trials using Trialforce. What I need to do is write a post install script which will make an API callout to a third party API and insert a new record in custom setting as ...
15
votes
1answer
281 views

Can we use a single class as a batchable class and install handler?

Background We would like to use a single class for installing our app. To avoid having any more classes than we need, we're trying to consolidate installation into a single class. Class public ...
4
votes
1answer
113 views

Can records locked by an approval process be updated by an InstallHandler?

I have some Apex batch code that is run from an InstallHandler to update fields on a custom object when an upgrade is done. As the resulting Apex Job aborted (with no detail of why) in a recent ...
2
votes
1answer
185 views

PostInstall Script Fails when installed in Sandbox

My app sends an email to the installer via a PostInstall script, but whenever someone tries to install my app in a Sandbox, the script fails. I'm wondering if Sandboxes require different setup? ...
6
votes
2answers
180 views

MAJOR Push Updgrade - PostInstall script error: “Field is not writeable”

I'm using the major push upgrades to install a new version of my managed package in our customer. In this package I have a new field and it didn't exist in an older version of the package. In the ...
3
votes
2answers
471 views

Update layout in post install script

I'm developing an app for the appexchange containing custom visualforce pages/components. Instead of asking the user to create custom fields and edit layouts to place the vf pages after the ...
2
votes
1answer
223 views

Schedule task 10 minutes after install

I have a schedulable class in my package that would run every hour to pull data using a callout and put it in the custom object. I am aware of using system.schedule as below: String scheduleTime='0 ...
6
votes
3answers
524 views

Install Script Batch Job failing (sObject type 'Contact' is not supported)

This is my scenario: I have a managed package, with quite some logic in it, and 2 triggers on normal SObjects, Lead and Contact the 2 triggers populate a field (included in the managed package) on the ...
2
votes
1answer
93 views

Writing Unit Test for OnInstall script

Here is the scenario. I have a custom field on Contact, which gets auto-populated in a trigger before-insert and before-update. All fine, but this is a field in an Managed Package. Where the package ...
10
votes
2answers
404 views

How to show a Visualforce page on the first installati‚Äčon of the managed package?

I want to show the vf page on the first installation of the managed package, or it can be the custom setting page should open up on installation, where the user will add all the custom settings on the ...
3
votes
1answer
132 views

PostInstall: Check if version is less than

Is it possible to check if the previous version is: "Less than" a certain value using the context.previousVersion() field. The documentation does a one-to-one comparison for a specific version like ...
5
votes
1answer
465 views

Post Install Script - Is it possible to run as a proper user?

I would like to create a CollaborationGroup when a managed package is installed. Currently I get an error 'INVALID_CROSS_REFERENCE_KEY, This user can't be added to the group.: []' when I run the ...
5
votes
1answer
1k views

Managed package install script - sObject type not supported

I have a managed package with a PostInstall script, however I'm having trouble accessing custom objects within it. Apon installation, I get the following error notification email ...