question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot exclude List Views with .forceignore after CustomObject retrieval

See original GitHub issue

Summary

Short summary of what is going on or to provide context.

I would like to exclude from metadata retrieve all the List Views that are fetched while using: sfdx force:source:retrieve -m "CustomObject:Account"

Steps To Reproduce:

Insert the following lines in the .forceignore file: # Exclude listViews **listViews **.listView-meta.xml **.listView

Then retrieve the Account object: sfdx force:source:retrieve -m "CustomObject:Account"

Then check that the listViews folder is still there and the metadata for listViews as well: image

Expected result

listViews folders should be empty or all listViews folder should be removed from the SFDX Project

Actual result

Describe what actually happened instead. listViews folders are still there and nothing is changed despite adding some listViews patterns as part of the .forceignore file

Additional information

Feel free to attach a screenshot.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.81.0-7b953c80d1 win32-x64 node-v12.18.3

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core) @oclif/plugin-autocomplete 0.1.5 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.2.0 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.9.1 (core) @oclif/plugin-update 1.3.10 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.4.3 (core) alias 1.1.3 (core) analytics 1.12.1 (core) auth 1.4.3 (1.4.3) config 1.2.1 (core) generator 1.1.3 (core) odaseva-dx 0.0.0 salesforcedx 51.3.0 (latest-rc) ├─ salesforce-alm 51.3.0 ├─ limits 1.0.4 ├─ user 1.1.2 ├─ schema 1.0.4 ├─ custom-metadata 1.0.11 ├─ apex 0.1.4 ├─ templates 51.3.0 └─ @salesforce/sfdx-plugin-lwc-test 0.1.7 sfdx-cli 7.81.0 (core) OS and version: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cristiand391commented, Dec 9, 2021

This should be fixed in latest sfdx v7.130.1 🎉 Release notes: https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#71301-dec-9-2021-stable

1reaction
WillieRuemmelecommented, Oct 26, 2021

hi @jcarmignani ​ I was able to add a listview to the .forceignore and see it be ignored. It is different than how they mention it though.

by adding

force-app/main/default/objects/*/listViews/*.*.*

I was able to ignore all listviews from all objects

and by adding

force-app/main/default/objects/Broker__c/listViews/*.*.*

I was able to ignore just the custom object Broker__c’s list views

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using .forceignore to ignore listViews for certain objects
But when I create a new listView for the Product2 object and do a force:source:pull the listView is not ignored and it gets...
Read more >
How to Exclude Source When Syncing or Converting
Add the .forceignore file to the root of your project for the force:source:* tracking commands. · Add the file to the Metadata retrieve...
Read more >
@salesforce/cli - npm
Run "sf config list" to see all the configuration variables you've set. Global configuration variable are always displayed; local ones are ...
Read more >
Why can't I find specific metadata in my Gearset comparison ...
Incorrect metadata comparison filter, so metadata item is not retrieved. Required metadata type(s) ... .forceignore file set to exclude the file/directory ...
Read more >
Salesforce DX (Developer eXperience) deep dive - Wilson Mar
Login DevHub; Script orgInit.sh; Scratch orgs config; List Orgs ... HISTORY: Initially, Developer Edition Orgs cannot be enabled as a “Dev ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found