2

I have prepared an import plan json using force:data:tree:export but for some reason when I attempt to import with force:data:tree:import I get the following error:

ERROR: No such column 'My_Field__c' on sobject of type Account.

I verified the field exist on the account within my scratch org and yet it consistently fails.

2

Turns out this is a Field-Level-Security issue. The fields in question apparently did not have visibility for my profile as I was the user attempting the import. Simple had to go to:

Object Manager -> Account -> MyField -> Set Field-Level-Security

And ensure your profile has visibility access

2
  • This is why you're supposed to migrate profiles and permission sets as part of your source code; using these objects lets you set up permissions automatically as part of a force:source:push so you don't need to remember to manually set up permissions every week. – sfdcfox Mar 22 '18 at 8:20
  • I do but apparently all my custom fields didn't get pulled with my package, all good now but figured it was worth nothing since the error message was very clear for anyone else that might come across this – Xtremefaith Mar 22 '18 at 8:55

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.