Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listmetadata returning no metadata for for type ListView #1285

Closed
ctewell opened this issue Nov 18, 2021 · 14 comments
Closed

listmetadata returning no metadata for for type ListView #1285

ctewell opened this issue Nov 18, 2021 · 14 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@ctewell
Copy link

ctewell commented Nov 18, 2021

sfdx force:mdapi:listmetadata -m ListView -u username
is returning "No metadata for type: ListView" starting with version 7.127. This worked fine in 7.126.

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

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.

Step 1. Upgrade CLI to 7.127.0-f33b8ac
Step 2 do this command
sfdx force:mdapi:listmetadata -m ListView -u username

Expected result

json for metdata will be listed

Actual result

The following is output:
No metadata found for type: ListView in org: ctewell@...............

System Information

  • If you are using sfdx
    • Run sfdx version --verbose --json
  • If you are using sf
    • Run sf version AND sf plugins --core
  • Paste the output here
    sfdx --version --verbose --json

{
"cliVersion": "sfdx-cli/7.127.0",
"architecture": "win32-x64",
"nodeVersion": "node-v16.13.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.3 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"alias 1.1.22 (core)",
"apex 0.3.0 (core)",
"auth 1.7.5 (core)",
"config 1.2.47 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.4 (core)",
"generator 1.2.1 (core)",
"limits 1.2.3 (core)",
"org 1.9.0 (core)",
"salesforce-alm 53.4.2 (core)",
"schema 1.0.10 (core)",
"sfdx-cli 7.127.0 (core)",
"source 1.4.0 (core)",
"telemetry 1.2.8 (core)",
"templates 52.6.0 (core)",
"trust 1.0.10 (core)",
"user 1.5.2 (core)"
],
"osVersion": "Windows_NT 10.0.14393"
}

Additional information

Feel free to attach a screenshot.

@ctewell ctewell added the investigating We're actively investigating this issue label Nov 18, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@ctewell ctewell changed the title listmetadata returning no metedata for for type ListView listmetadata returning no metadata for for type ListView Nov 18, 2021
@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Nov 19, 2021
@uip-robot-zz
Copy link

This issue has been linked to a new work item: W-10203090

@shetzel
Copy link
Contributor

shetzel commented Nov 20, 2021

I moved this command from the salesforce-alm plugin to the source plugin in the 7.127.0 release. Turns out the bug is due to a very slight difference in how the jsforce list call is made:
working:
connection.metadata.list({ type: ListView }, undefined)
non-working:
connection.metadata.list({ type: ListView, folder: undefined }, undefined)

The fix will be in the next release candidate. Sorry for the regression.

@shetzel
Copy link
Contributor

shetzel commented Nov 22, 2021

Fixed with salesforcecli/plugin-source#309

@shetzel shetzel removed the investigating We're actively investigating this issue label Nov 22, 2021
@frankpeleato
Copy link

@shetzel Experiencing this same problem with the flag -m Layout. I'm on version 7.127.0

@shetzel
Copy link
Contributor

shetzel commented Nov 23, 2021

The fix isn't specific to ListView. Layouts should also be fixed. There's no release this week so it'll be next week. Alternatively you could link the source plugin branch with the fix to your CLI to get the fix sooner.

@frankpeleato
Copy link

The fix isn't specific to ListView. Layouts should also be fixed. There's no release this week so it'll be next week. Alternatively you could link the source plugin branch with the fix to your CLI to get the fix sooner.

@shetzel Thank you for the update! I will wait for your release.

@rajeswarr1
Copy link

rajeswarr1 commented Nov 23, 2021

@shetzel Facing the same issue with other components like AssignmentRule, AutoResponseRule, WorkflowAlert, WorkflowTask, WorkflowFieldUpdate, SharingOwnerRule, SharingCriteriaRule, CustomField, ValidationRule, Weblink etc....

Whereas sfdx force:mdapi:listmetadata works for AssignmentRules, AutoResponseRules, Workflow, SharingRules, CustomObjects .

Basically all the metadata (sub) components which are inside a component file are not getting listed.

Hope the fix would resolve for above metadata component types as well.

@shetzel
Copy link
Contributor

shetzel commented Nov 23, 2021

@rajeswarr1 - all types should be fixed. The code is now making the exact same request as the legacy plugin.

@rajeswarr1
Copy link

rajeswarr1 commented Nov 25, 2021

Thank you @shetzel
Just noted another observation that for SharingRules and SharingCriteriaRules the number of components retrieved is lesser when using sfdx force:mdapi:listmetadata command with v 7.127.0.

The number of components displayed in v7.126.0 seems to be accurate. Would the fix applied also resolve the above discrepancy.

@frankpeleato
Copy link

Still happening as of version 7.129.0.

@bryan-b-johnson
Copy link

@shetzel This does not appear to be fixed in version 7.129.0. Is there a specific version we can expect this change? Thanks!

@mshanemc
Copy link
Contributor

mshanemc commented Dec 3, 2021

I see it working in 7.130.1 (currently RC).

@cristiand391
Copy link
Member

cristiand391 commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

8 participants