Skip to main content

I am trying to create a package version using Salesforce DX for an unlocked package that includes EDA 1.103 as a package dependency, but when I attempt to create a package version, I got the following error:

> ERROR running force:package:version:create:  An error occurred while trying to install a package dependency, ID 04t1R000001E42D: Accounts Missing Organization Feature: Account.RecordType

I was able to resolve this error by updating my sfdx-project.json to add a reference to my definition file:

```

"definitionFile": "config/project-scratch-def.json",

```

and specify default record types in my scratch org json file:

```

    "account": {

        "defaultRecordType": "default"

    }

```

I now see the following error which I am unable to resolve:

```

sfdx force:package:version:create:report -i 08c4W000000PAv2QAG

=== Package Version Create Request

NAME                           VALUE

ID                             08c4W000000PAv2QAG

Status                         Error

Package Id                     0Ho4W000000TNAxSAO

Package Version Id

Subscriber Package Version Id

Tag

Branch

Created Date                   2020-09-07 01:23

Installation URL

=== Errors

(1) An error occurred while trying to install a package dependency, ID 04t1R000001E42D: Unexpected Error, Details: The package installation failed. Please provide the following information to the publisher:  Organization Name: SFDX Build Org Organization ID: 00D2D000000Da3v Package: EDA Version: 1.103 Error Message: The post install script failed.

```

On the EDA github repository I noticed that that the unpackaged/post directory has record types for course connection and case, so I added more defaultRecordType entries:

attempt 1

```

    "case" : {

      "defaultRecordType": "default"

    },

    "course_enrollment__c": {

      "defaultRecordType": "default"

    },

```

attempt 2

```

    "case" : {

      "defaultRecordType": "default"

    },

    "hed__course_enrollment__c": {

      "defaultRecordType": "default"

    }

```

However, I now get the following error, which I cannot remove at all, _even after removing references to hed__course_enrollment__c and course_enrollment__c from my project-scratch-def.json file

```

ERROR running force:package:version:create:  Course_enrollment__c.Default: Not in package.xml,Hed__course_enrollment__c.Default: Not in package.xml

```

I have successfully verified that if I create a package version without validation, I am able to install it successfully, after installing EDA.  

Can someone tell me what files or Salesforce orgs I need to update to be able to create a verified package version with EDA as a dependency successfully?

2 件のコメント
  1. 2020年9月8日 17:28
    @Dileep Burki

    Case number: 27492001 ...

    In a discussion on powerofus:

    https://powerofus.force.com/s/question/0D51E00005Q2HLCSA3/salesforce-dx-unlocked-package-specifying-hedaeda-as-a-package-dependency .. @David Reed

    suggested I use an org-dependent unlocked package, but being a beta feature, that's unfortunately a non-starter as this package needs to be published to our clients.

    We intend to have our clients own/manage the Apex classes themselves, which is why using managed packages is not really an option for us.

    Unlocked packages provide upgradeability, which is why we'd like to move from unmanaged packages (which we're currently using) to this...

0/9000