1

So i created package on two other packages. One is managed package from AppExchange named propel and the other is unmanaged package made on my production holding some of metadata that are there.

So now i build something over that and tried to create package version. But when trying to i get error:

=== Errors (1) Design_Time_Sheet__c.Test1__c: Entity 'Design_Time_Sheet__c' not found. (2) PDLM__Project__c.test2__c: Entity 'PDLM__Project__c' not found.

So fields Test1 and Test2 are changes i did build and missing elements are objects that are in the packages i use as base.

Here is my sfdx-project.json file:

{
    "namespace": "",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "45.0",
    "packageDirectories": [
        {
            "definitionFile": "config/ossurCommonCore.json",
            "package": "amsZeroStateTest1",
            "default": true,
            "versionNumber": "0.0.0.NEXT",
            "versionName": "Version 0.0",
            "path": "force-app",
            "dependencies": [
                {
                    "package": "Propel",
                    "subscriberPackageVersionId":"04t1S000000XzOQQA0"
                },
                {
                    "package": "amsZeroState",
                    "subscriberPackageVersionId":"04t1r000001aWRr"
                }
            ]
        },
        {
            "path": "force-app",
            "package": "amsZeroStateTest1",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "default": false
        }
    ],
    "packageAliases": {
        "Propel": "04t1S000000XzOQQA0",
        "amsZeroState": "04t1r000001aWRr",
        "amsZeroStateTest1": "0Ho1r000000008ZCAQ"
    }
}

What did i do wrong? how to make it see the elements from packages that my package is going to depend on.

Command i use to create version:

sfdx force:package:version:create -p idOfMyPackage -f "sfdx-project.json" -x

0

So the problem was order of elements in file here you have file that worked:

{
    "sourceApiVersion": "45.0",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "namespace": "",
    "packageDirectories": [
        {
            "definitionFile": "config/ossurCommonCore.json",
            "package": "ZeroStareAMSApp",
            "default": true,
            "versionNumber": "0.0.0.NEXT",
            "dependencies": [
                {
                    "package": "Propel",
                    "subscriberPackageVersionId": "04t1S000000XzOQQA0"
                }
            ],
            "versionName": "Version 0.0",
            "path": "force-app"
        },
        {
            "path": "force-app",
            "package": "amsZeroStateApp",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "default": false
        },
        {
            "path": "force-app",
            "package": "ZeroStateAMSApp",
            "versionName": "ver 0.1",
            "versionNumber": "0.1.0.NEXT",
            "default": false
        }
    ],
    "packageAliases": {
        "Propel": "04t1S000000XzOQQA0",
        "ZeroStareAMSApp": "...",
        "ZeroStareAMSApp@0.0.0-1": "..."
    }
}

I placed "..." in place of id's of my packages ;)

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.