Package Dependencies in First-Generation Managed Packages
AppExchange packages and Visualforce are available in: Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
Apex available in: Enterprise, Performance, Unlimited, and Developer Editions |
User Permissions Needed | |
---|---|
To upload packages: | Upload AppExchange Packages |
To view Visualforce dependencies: | Developer Mode |
Packages, Apex classes, Apex triggers, Visualforce components, and Visualforce pages can have dependencies on components within an org. These dependencies are recorded on the Show Dependencies page.
Dependencies are important for packaging because any dependency in a component of a package is considered a dependency of the package as a whole.
Dependencies are important for Apex classes or triggers. Any component on which a class or trigger depends must be included with the class or trigger when the code is deployed or packaged.
In addition to dependencies, the operational scope is also displayed on the Show Dependencies page. The operational scope is a table that lists any data manipulation language (DML) operations (such as insert or merge) that Apex executes on a specified object. The operational scope can be used when installing an application to determine the full extent of the application’s database operations.
To view the dependencies and operational scope for a package, Apex class, Apex trigger, or Visualforce page:
- Navigate to the appropriate component from Setup.
- For packages, enter Packages in the Quick Find box, then select Packages.
- For Apex classes, enter Apex Classes in the Quick Find box, then select Apex Classes.
- For Apex triggers, from the management settings for the appropriate object, go to Triggers.
- For Visualforce pages, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
- Select the name of the component.
- Click View Dependencies for a package, or Show Dependencies for all other components, to see a list of objects that depend upon the selected component.
If a list of dependent objects displays, click Fields to access the field-level detail of the operational scope. The field-level detail includes information, such as whether Apex updates a field. For more information, see Field Operational Scope.
Packages, Apex code, and Visualforce pages can depend many components, including but not limited to:
- Custom field definitions
- Validation formulas
- Reports
- Record types
- Apex
- Visualforce pages and components
For example, if a Visualforce page includes a reference to a multicurrency field, such as {!contract.ISO_code}, that Visualforce page has a dependency on multicurrency. If a package contains this Visualforce page, it also has a dependency on multicurrency. Any organization that wants to install this package must have multicurrency enabled.