0

I am trying to complete my "Build your first Unlocked package" step in the "unlocked Packages for Customers" Badge

while doing this i am getting this errorenter image description here

The error is following:

ERROR running force:package:version:create: AccountController: SELECT Id,Name,Active__c FROM Account WHERE Active__c ^ ERROR at Row:1:Column:16 No such column 'Active__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

I fail to understand whats causing this error.

Can somebody please help me through this? would be much appreciated

2

Your unlocked package must be a complete package. This means that all dependencies must exist in your unlocked package, either directly or in a dependency. To resolve this error, simply do:

sfdx force:source:retrieve -m CustomField:Account.Active__c

This will add the following file:

force-app/main/default/objects/Account/fields/Active__c.field-meta.xml

Assuming no other dependencies exist, this will allow the package to to build successfully. You may need to add additional dependencies to successfully complete this package.

8
  • that solved the issue thanks for prompt reply but after moving on i got the following error: – zsk_1 Jan 7 '20 at 5:12
  • ERROR running force:package:version:create: ^ ERROR at Row:1:Column:30 sObject type 'Package2' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. Try this: Packaging is not enabled on this org. Verify that you are authenticated to the desired org and try again. Otherwise, contact Salesforce Customer Support for more information. – zsk_1 Jan 7 '20 at 5:13
  • 1
    @zsk_1 You need to enable Dev Hub in your org, and make sure you have the appropriate permissions. Also, make sure that the Dev Hub org is set up as the default (sfdx force:config:set defaultdevhubusername=mydevhuborg@whateverdomain.com). – sfdcfox Jan 7 '20 at 5:35
  • I have already enabled my devhub org – zsk_1 Jan 7 '20 at 5:37
  • and i am using a system administrator profile so i guess i already have permissions granted by default... – zsk_1 Jan 7 '20 at 5:46

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.