The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
8 views

How to give date and time values in request body using postman

I have Created a Request Body in Event Object with Date and Time Details, how to give the Date and Time Values in JSON format using Postman { "Type":"contact call", "WhoId":"0038E00000GWXhL",...
1
vote
0answers
22 views

Update Profiles in APEX

Anything I've read indicates that there's no native APEX DDL layer for Metadata such as Profiles. It seems the only way to update profiles in Apex is to use FinancialForce's MDAPI wrapper. This is ...
1
vote
1answer
23 views

WebServiceCallout in InstallHandler

I have a package with a post-install script. The script calls a class which uses WebServiceCallout. When running separately, it is OK, but when running in the Post Install script context, it fails. ...
3
votes
0answers
39 views

Translating using Translation Workbench in a Managed Package

I'm using translation workbench in my managed package to support different languages. I've so far had the necessity to translate just a couple of field labels in standard User page layouts. These ...
0
votes
0answers
21 views

Post Install Script and Custom Metadata Types: sObject type '<my_custom_metadatatype__mdt>' is not supported

I have a package where I have a new Custom Metadata Type and a few records for it included as components in it. Within the Post Install Script class, I query for this Custom Metadata Type's records ...
0
votes
1answer
42 views

Entity is not api accessible - Group Object

When installing my managed package into a test org I get the following error: System.NoAccessException: Entity is not api accessible This error is coming when accessing a map with the following ...
2
votes
1answer
44 views

Field permission in post install script

I want to create 1 permission set for my managed package and in that I need to assign standard Account object permission and its field permission. So here is my query : Can we assign field ...
2
votes
1answer
131 views

Is it Possible to add multiple Post install Scripts while creating a manged package?

We have created a managed package which consist of multiple custom setting objects with multiple handler classes.Now in Post Install Script field,We are able to add only one handler class.How can we ...
5
votes
2answers
61 views

How to Check whether my install handler works properly?

I have created a Installhandler class for the custom setting object and I would like to test whether it works properly when the installer installs it? How can I accomplish this? Since this is the ...
4
votes
0answers
39 views

Does post-install script run when a patch version of the package is installed?

Recently we've run into a situation where we've provided an installation link for a patch version of the package (e.g. v1.23.4) to a user, and after this user has successfully installed the patch, the ...
1
vote
1answer
106 views

Managed package takes too long to install

When developing a huge app (200+ classes, because FFlib and separation of conserns), Salesforce throws me an error while installing the package in a test environment: The install proceeds after a ...
0
votes
1answer
23 views

Prompting user for user credential right after the app installation

Is it possible to ask for user input at the end of app installation? I need users to enter credentials for external API at the end of app installation or very beginning of an app. Basically, I'm ...
1
vote
0answers
25 views

Throw an error that makes package install fail

In my managed package I'm using a Post Install script to create and update some necessary data in customer orgs. This needs to happen without error otherwise some data integrity issues occur. At ...
2
votes
0answers
67 views

Secure communication between InstallHandler and third party application

During the installation of our package we need to fetch data (related to the installer organization) from a third party system (integration part of our solution). Like stated in the documentation ...
4
votes
2answers
309 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
59 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
150 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
47 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
276 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
77 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
81 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
84 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
17 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 ...
2
votes
1answer
170 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 ...
1
vote
4answers
265 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
205 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 ...
3
votes
0answers
85 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
179 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 ...
7
votes
1answer
285 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
158 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 ...
1
vote
1answer
350 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
26 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 ...
13
votes
1answer
1k 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
38 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.
38
votes
1answer
1k 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
102 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 ...
4
votes
1answer
277 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
67 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
190 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
195 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 ...
17
votes
1answer
537 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
153 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
2answers
413 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
238 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
879 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
341 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 '...
7
votes
3answers
813 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
125 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 ...
13
votes
2answers
987 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
304 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 ...