The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
36 views

How do you / can you assign a Record Type to a Permission Set in Apex code?

I have a post-install handler that is executed as part managed package installation. One of the tasks performed by the post-install handler is to create a Permission Set, and assign some object ...
1
vote
0answers
17 views

Assign new Record Types on Managed Package object on upgrade?

We have an object in a managed package, that in previous versions had no record types. In the next version, it has two. On install of test versions of the package, all profiles are assigned Master ...
3
votes
0answers
37 views

Updating page layout when package installed

I'm developing a managed package and I have some custom fields of "Lead" sobject included + custom lead layout. I want to automate it all for user. Is there any way to: replace default layout, add ...
1
vote
0answers
19 views

OnInstall package using HttpRequest or Callout creates System.CalloutExceptio

I've tried alot of solutions for this issue but when I install the package then I received an email with exception info as below: System.CalloutException: You have uncommitted work pending. Please ...
3
votes
3answers
94 views

Apex code to override standard button/link for standard object?

I'm creating an application that will be distributed as a managed package on the AppExchange. As part of the install process, I would like to override some standard links/buttons for standard objects ...
0
votes
1answer
42 views

Post install script giving a problem

I am creating a package. I have did a mistake and that mistake is Object that i have created starts with 00000. But my logically it should have been started with 00001. But now I am not able to change ...
3
votes
1answer
31 views

Do we have Pre Install script like Post Install?

We have a app in appexchange and would like to know if there is a Pre Install script similar to post install script? The reason is our application is applicable only to organizations which have ...
4
votes
0answers
68 views

Postinstallscript fails to insert child records

I have a post install script that executes after the package has been installed and it worked perfectly. But recently it had to be changed to include some dummy data as an example. So I added the code ...
2
votes
0answers
13 views

CollaborationGroup records not accessible in post installation script

I am trying to read CollaborationGroup records in post installation script. My class implements InstallHandler and is without sharing, Still no records are returned by following query even though ...
0
votes
0answers
63 views

InstallContext object + getting the version

I see according to this that and installContext object has access to the previous version, but if I call System.requestVersion() within the OnInstall method, will I get the version of the package ...
1
vote
1answer
66 views

Calling Apex REST class from post install script

I need to call an exposed Apex class in my dev org from the post install script. This post install script will run on the installation of the managed package on a clients org and will send the package ...
0
votes
0answers
30 views

Salesforce post install script error

For salesforce applications when post install script fails is there a functionality provided by salesforce with which the developer can be informed that there was an error. I have seen instances where ...
0
votes
0answers
64 views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY when setting custom field on a Task

I have a managed package with post-install script that executes a batch job to initialize a custom field on the Task object that is defined by package. It has worked fine for me in the developer ...
0
votes
0answers
18 views

Question about InstallHandler & Sandbox

If an installed managed package is deployed from sandbox to production what happens to post install script? Is it count as upgrade (context.isUpgrade) or the script never runs on production (maybe ...
0
votes
1answer
83 views

PostInstall script does not run after package installation

I have post install script that is suppose to create records belonging to a certain custom object and all other custom obj records related to it. In my onInstall method I am querying if the current ...
0
votes
1answer
63 views

How to test a Salesforce Installhandler?

I have written one class for Post Installment InstallHandler. I also have written Test class for the same which work very fine. Run successfully with full coverage. But Now, I suppose to be sure ...
2
votes
0answers
58 views

Creating/managing site programmatically

We are creating a managed package that contains a few Visualforce pages that should be public accessible. Everything works as expected, except for 1 thing: For each org we have to create a new site ...
2
votes
1answer
104 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
14 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 ...
7
votes
1answer
126 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
106 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
143 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
24 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 ...
10
votes
1answer
685 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 ...
2
votes
0answers
34 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.
29
votes
1answer
885 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
80 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 ...
3
votes
2answers
160 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
59 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
153 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
160 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
387 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
133 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
269 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
212 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
700 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
278 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
663 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
112 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
690 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
2answers
207 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
578 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 ...