1

I am trying to turn an app into an unmanaged package using the package manager's wizard in setup.

The app has some custom fields within standard objects that I am trying to include in the unmanaged package.

Example: I have created a new custom field named "ninofield" in the standard object called "Account" and I have associated the object and the custom field to a page layout called "AR-layout". Then, I added the page layout "Ar-layout" to the unmanaged package using the package manager wizard. However, the custom field "ninofield" does not show up as dependency. See the images below for reference to this example.

Issue: Why isn't the custom field showing up? Am I miss understanding something?

1) Here you can see that the custom field is part the Account object: Account Object custom field "ninofield"

2) Here you can see that the "ninofield" is assigned the AR Layout: Where is this used?" screen

3) Here is the package and its dependencies after including the AR Layout: package manager screen

4) The package.xml that is auto-generated when retrieving the package using SFDX does not include the custom field "ninofield":

"[![package.xml

6
  • What makes me curious is how are you attempting to create this package.xml. This is not a standard salesforce function, so this sounds like an IDE problem. Sep 6, 2019 at 19:44
  • Also... it is very clear from the package picture that ninofield is NOT included in your package at all, so it will not show up in the package.xml Sep 6, 2019 at 19:45
  • Well, the package.xml is created using sfdx force:mdapi:retrieve command. It retrieves the package and auto-generates the package.xml. I am trying to avoid creating the package.xml manually due to complex dependencies within the app that I am unaware of.
    – Nino Y
    Sep 6, 2019 at 19:52
  • Look at my second comment. Your package doesn't include the field... so the package.xml won't either. Sep 6, 2019 at 19:53
  • 1
    Dependent items are not automatiicaly pulled in to the package by Package Manager. When you click View Dependencies in Package Manager, after adding the layout, I would expect the field to be there. In that list, you can select the dependent items that you want in the package. Sep 7, 2019 at 3:39

1 Answer 1

0

Some components auto include fields when adding them to the package (such as custom objects)

https://help.salesforce.com/articleView?id=packaging_components_auto_added.htm&type=5

* EDIT *

Page Layouts do not auto-include fields in the package. For custom fields on Standard objects, add the custom field to the package, together with layouts, objects and other metadata. You can do so from the "View Dependencies" page or using the "Add" button and searching for Custom Fields.

6
  • Looks like your article is pinpointing custom fields in Custom Objects only. My concern is custom fields in Standard Objects
    – Nino Y
    Sep 10, 2019 at 16:14
  • I thought it said custom fields under page layouts. Page layout = Actions, custom buttons, custom links, s-controls, and Visualforce pages Sep 10, 2019 at 16:30
  • ah okay. yeah I don't see custom fields under page layout. Explains a lot why they were not being added when I did bring in page layout. This is a very good article though, It will help me a lot on understanding the unexpected behaviors. thank you for sharing.
    – Nino Y
    Sep 10, 2019 at 16:57
  • Would you be able to add the field manually? Add --> Custom Field (seems possible on my end) Sep 10, 2019 at 20:06
  • I thought so too, but for some reason, I don't get the full list of custom fields when I click on it. It might be freezing because we have so many custom fields. But I'm not seeing the ones I want.
    – Nino Y
    Sep 18, 2019 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .