New answers tagged

4

Spring '20 release notes are mentioning increased speed when uploading a change set.


0

I hit this too; it seems shared activities need to be enabled in the target org and since the allowUsersToRelateMultipleContactsToTasksAndEvents scratch org config setting has been deprecated I think we're out of luck when it comes to automation (though you can enable it manually in Setup>Activity Settings) https://developer.salesforce.com/docs/atlas.en-us....


0

The generated package XML looks incorrect. The correct package XML structure for Survey setting would be <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>Survey</members> <name>Settings</name> </types> <version>47.0</version> &...


0

Currently, there is no way to execute post-deployment scripts in salesforce to execute scripts after deployment. But, If you have a CI/CD pipeline in place for the deployment.. we can use apex execute sfdx force:apex:execute and the apex class can just contain anonymous script using ExecuteAnonymousResult executeAnonymous(String code) This is like ...


1

A slight work around for this is to add a class with a static method to the unmanaged package and then run the method anonymously in the developer console post install... public class MyUnmanagedPackagePostInstallScript { public static void doSomething() { //I do things like create records and dml } } Install the package with the class ...


4

You should Disable Caching. This has obvious performance penalties, but should show the latest version of your code. From Setup, enter Session in the Quick Find box, and then select Session Settings. Deselect the checkbox for “Enable secure and persistent browser caching to improve performance”. Click Save.


2

Protected Custom Metadata Types are not visible in the subscriber org: When a custom metadata type is package-level protected using 2GP, records are only accessible from code within that managed package. Also the subscriber, and other packages, even within the same namespace, can’t access the custom metadata type or its records. That's the intended ...


1

This is due to the picklist value that is being used in this WorkflowFieldUpdate is not present in the Target org. Make sure to include the Field being updated in the package OR make sure that the picklist value exists in the Target org.


1

For your 2GP packages, you need to use the name/versionNumber format for your dependencies: "dependencies": [ { "package": "ParentPackage", "versionNumber": "0.1.0.LATEST" } ] It took me a little while to figure this out myself. Also, make sure you do not have an object-meta.xml file in the root of each object folder for the child ...


1

Four years later, Salesforce DX and Unlocked Packages have reversed the answer given above. Now Salesforce is recommending that application development takes place in Unlocked Packages and that these can be installed in Production or a Sandbox for many of the reasons that the original post mentions. Existing applications should be rebuilt as Unlocked ...


Top 50 recent answers are included