1

When I separate my code into packages, I occasionally have some fields for standard-objects (i.e. Account) in Package A and some other (different!) fields in Package B.

My folders in my working directory are basically structured like this:

.sfdx
.config
force-app
  main
    default
src
  package a
    classes
    objects
    flows
    ...
  package b
    classes
    objects
  package c
    classes

Including/excluding folders for force:source:push works fine, However if any package A contains the sub-folder Account with some fields, any subfolder Account in another (subsequent, determined by the order of appearence in my sfdx-project.json) package is ignored.

Can anybody think of an solution besides dragging all the customizings on accounts from all packages to a shared package?

Edit: I am on version sfdx-cli/6.29.0-0a2482692c (darwin-x64) node-v8.9.4

  • This used to work in previous versions, I think. Have you tried reaching Wade Wegner? – sfdcfox Aug 20 '18 at 9:53
  • No, I did not. But I will, thank you for pointing me there :). – J. Lietzau Aug 20 '18 at 12:35
0

I can still reproduce this, however I also found a workaround. Since it works for me and only takes a couple of seconds (per package), I can "accept it as an answer".

If you put your package-src-dir (package a, package b, etc in my example) in your .forceignore and only have one package that contains the fields for the duplicated object "active" per force:source:push command, the metadata gets pushed and all dependencies work. After repeating the process multiple times (depending on the number of packages with fields on the duplicate object), you can savely keep all packages "active" in your .forceignore, as long as you never update/alter the metadata of the duplicate sObject in two packages at a time.

Hope this helps other people with the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.