15

While trying to pull changes from a scratch org (sfdx force:source:pull, tried with and without -f), I'm getting this error:

Entity of type 'ListView' named 'Note_Relation__c.My_Notes' cannot be found.

I do have a custom object Note_Relation__c, and it exists both locally and in the scratch org. However, it's not an object that is normally accessed directly. It has no tab, and should have no list views. Nonetheless, I've checked the object's list view (via prefix, e.g., /a0D in both Classic and LEX view), and I can find no list views at all. I've also tried adding an entry to .forceignore:

force-app/main/default/objects/Note_Relation__c/listViews/My_Notes.listView

This has no effect either. At this point, I'm stuck with a bunch of config changes in a scratch org that I cannot pull. I can find no references to this error message with scratch orgs. Has anyone seen this issue?

Edit to clarify: I tried the .forceignore line based on what I think the file name should be; I have no force-app/main/default/objects/Note_Relation__c/listViews directory locally.

Edit 2: Workaround: I found a workaround that doesn't make sense to me, but it works. I'm not adding it as an answer yet because I'm not sure what's happening. The workaround is to add the following line to .forceignore

Note_Relation__c.My_Notes

Even though this isn't a DX filepath, it's the name from the error message, and it seems to work.

1
  • 1
    Clear source tracking information with force:source:tracking:clear or force:source:tracking:reset If source tracking gets confused, and starts reporting inaccuracies, you can clear local source tracking information with force:source:tracking:clear or both local and remote source tracking information with force:source:tracking:reset. Be very careful when using these commands, because they cannot be undone, and they reset source tracking at the org-level, which means other developers also have their source tracking reset. Commented Aug 3, 2021 at 16:01

2 Answers 2

13

Your workaround is spot on. We had quite similar issue with pull as mentioned in this question.

Also the documentation for .forceignore seems to be updated (or I may not have noticed it earlier), which says-

To exclude the same metadata in your local DX project (file system) and in a scratch org, create two entries to cover source:status, source:push, and source:pull.

For example, if you have a custom profile called Marketing Profile, include these two entries in .forceignore:

  • force-app/main/default/profiles/Marketing Profile.profile-meta.xml (ignores it during source:push or source:status)
  • Marketing Profile.profile (ignores it during source:pull or source:status)

tl;dr: Use absolute path of directory from force-app to the file to ignore for push and relative path to ignore for pull.

2
  • 1
    Aha, I think that is a recent addition to the docs. Explains the workaround nicely. Good find. Commented Nov 14, 2018 at 21:53
  • 4
    2.5 years later and this is still an issue!
    – hgolov
    Commented Feb 15, 2021 at 7:11
3

I got the error,

Entity of type 'ListView' named 'WorkPlanSelectionRule.My_WorkPlanSelectionRules' cannot be found

Entity of type 'ListView' named 'WorkPlan.All_WorkPlans' cannot be found

Entity of type 'ListView' named XXX

The workaround that worked for me was to add the following line to .forceignore and the source pull worked

*WorkPlan*
1
  • This worked for me after getting Entity of type 'ListView' named 'PricebookEntry.null' cannot be found this error and using this *PricebookEntry*
    – Mattisdada
    Commented Aug 5, 2021 at 7:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .