I want to build a package version of a third party library (Reltio) but I have a some errors that are popping up when I try to create a package version:
Request in progress. Sleeping 30 seconds. Will wait a total of 1200 more seconds before timing out. Current Status='Initializing'
Request in progress. Sleeping 30 seconds. Will wait a total of 1170 more seconds before timing out. Current Status='Verifying features and settings'
ERROR running force:package:version:create: Multiple errors occurred:
(1) ReltioAccountCreateTest: Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsTest : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccounts : Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(2) ReltioContactCreateTest: Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsTest : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccounts : Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(3) ReltioHierarchy: Invalid field uri__c for SObject Account
(4) ReltioSearchAccounts: Apex class 'ReltioSearchAccounts' does not exist
(5) ReltioSearchContacts: Apex class 'ReltioSearchContacts' does not exist
(6) ReltioSearchAccounts: Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(7) ReltioSearchAccountsHelper: Variable does not exist: uri__c
(8) ReltioSearchAccountsHelper: Variable does not exist: SBC_Imported__c
(9) ReltioSearchAccountsTest: Dependent class is invalid and needs recompilation:
Class ReltioSearchAccounts : Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(10) ReltioSearchContacts: Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(11) ReltioSearchContactsHelper: Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(12) ReltioSearchContactsTest: Dependent class is invalid and needs recompilation:
Class ReltioSearchContacts : Dependent class is invalid and needs recompilation:
Class ReltioSearchHelper : Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
(13) ReltioSearchHelper: Dependent class is invalid and needs recompilation:
Class ReltioSearchAccountsHelper : Variable does not exist: uri__c
I noticed that Account object fields SBC_Imported__c and uri__c are in a different package.
While I can attempt to bring in those fields into this package, I was also thinking that perhaps I could use unpackagedMetadata setting in sfdx-project.json and specify the unpackaged folder (Being Lazy) just to build a version as those fields exist in another package.
So My sfdx-json:
{
"packageDirectories": [
{
"path": "source",
"default": true,
"package": "my-reltio-package",
"versionName": "ver 1.0",
"versionNumber": "1.0.0.NEXT",
"unpackagedMetadata": {
"path": "unpackagedMetadata/UsedForVersionCreationOnly"
}
},
{
"path": "unpackagedMetadata/UsedForVersionCreationOnly",
"default": false
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "52.0",
"packageAliases": {
"my-reltio-package": "0Ho6R2222000XZBKSA4",
"[email protected]": "04t622222011OfuQAE"
}
}
I then want to add the Account object and fields under there so that I have:
unpackagedMetadata->UsedForVersionCreationOnly->objects->Account (Account.object-meta)->fields(uri__c.field-meta/SBC_Imported__c.field-meta
I get the same errors as above. So it does not seem to be respecting the unpackagedMetadata setting. What am I doing wrong?