The tag has no wiki summary.

learn more… | top users | synonyms

7
votes
1answer
139 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
19 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.
21
votes
1answer
237 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
55 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
81 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
40 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
110 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
77 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
227 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
106 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
147 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
166 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 ...
2
votes
2answers
391 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
189 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 ...
5
votes
3answers
479 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
89 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 ...
9
votes
2answers
320 views

How to show a vf 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
97 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
432 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
907 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 ...