Flows referencing unused components from managed packages fail to load (Spring 18)
Last updated 2018-04-06 ·Reference W-4708955 ·Reported By 3 users
Flows and process can refer to a managed object field in them. The managed package can choose to delete the field in their next version.
Up on upgrade of the managed package, even though the field is deleted inside the managed package, the field still remains in the subscriber org - but not as managed field.
Flows and process continue to refer them.
The record couldn’t be saved because it failed to trigger a flow. We cannot find myVariable_current.SU__Account__c. Contact your administrator for help.
Create a new developer org with user - firstname.lastname@example.org
Create another new enterprise org with user - email@example.com
Now login into the dev org
Create a custom object called Donation.
Create a Master-Detail custom field towards Account in the Donation object.
Goto setup and packages.
Create a namespace for the org - say - sample
Make sure the org can create managed packages
Now create a managed package (make sure managed check box is enabled)
add the custom object Donation into the package
Upload the package
Give a package name: Say sample
Give version name: Spring 2018
Make sure the package is managed & released (not beta)
Once the upload is complete, you will get an installation URL. -copy that
Now login into the enterprise org
Install the package using the package installation URL
After install, you can see the new custom managed object with the custom field
Now create a process on the managed object using process builder
Process on Donation Object that fires on all Creates & updates
Criteria: None - always execute actions
Add immediate action:
Update record: choose the related account object for update
Field: Set Account.Description to “From Process Builder”
Now create an account a1
There will be no new tabs for creating the Donation object - find out the key prefix for Donation object from workbench and directly goto the object create page - for example, if the key prefix is a00, goto http://hostname:6109/a00/e
create a donation object with account=a1
Donation creation is successful and confirm that the a1.description is updated by process builder.
Now login back to Dev org
Enable the perm Managed Component Deletion
Goto the dev org setup page and goto the custom object Donation
Delete the custom field → Account
Now goto the packages and upload the package again
Give a name and new version number
make sure its managed and released (not beta)
get the installation url
Login back into enterprise org
Install the new version of the package using the url
After successful upgrade, it can be noticed that the Donation object on this org still have the custom field - but no managed icon near it
Also, click view components in the package to see that the Account is shown as unused component.
Now open process builder - deactivate and reactivate the same process on donation object - this will clear the org cache and force to load the flow from DB
Now goto the Donation object creation url and create a donation object
The Donation object creation fails with the following error
The record couldn’t be saved because it failed to trigger a flow. We cannot find myVariable_current.sample__Account__c. Contact your administrator for help.
The object creation should be successful
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.