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

force:data:tree:export knowledge query with ID, query returns no results because ID has been lowercased #1642

Closed
aheber opened this issue Jul 26, 2022 · 3 comments
Labels
investigating We're actively investigating this issue

Comments

@aheber
Copy link

aheber commented Jul 26, 2022

Summary

https://github.com/salesforcecli/plugin-data/blob/3f1c0b64cc1205e13df1104864bb5d29f9ea41e8/src/api/data/tree/exportApi.ts#L127
The inbound query is lowercased. For some SObjects, specifically Knowledge__kav and other article version objects, a lowercased 18-digit ID is not considered a match for the upper-cased version. I fully understand this is wrong, it should match as that is the point of 18-digit Ids. Take it up with the team on the other end of that query. (I will open a separate support case)

Steps To Reproduce:

To test, change out the ID to a valid one, and a valid SObject Article Version Type in target org
sfdx force:data:tree:export -u prod -q "SELECT Id FROM Knowledge__kav WHERE Id = 'ka36S0000006qgKQAQ'"
Should return a result matching that record ID, the actual resulting query that is executed is
https://[org].my.salesforce.com/services/data/v55.0/query?q=select%20id%20from%20knowledge__kav%20where%20id%20%3D%20'ka36s0000006qgkqaq'

Expected result

It should have returned a single matching result.

Actual result

It returns nothing

System Information

  • Which shell/terminal are you using? powershell

  • If you are using sfdx

    • Run sfdx version --verbose --json
{
        "cliVersion": "sfdx-cli/7.160.0",
        "architecture": "win32-x64",
        "nodeVersion": "node-v16.16.0",
        "pluginVersions": [
                "@oclif/plugin-autocomplete 0.3.0 (core)",
                "@oclif/plugin-commands 1.3.0 (core)",
                "@oclif/plugin-help 3.3.1 (core)",
                "@oclif/plugin-not-found 1.2.6 (core)",
                "@oclif/plugin-plugins 1.10.11 (core)",
                "@oclif/plugin-update 1.5.0 (core)",
                "@oclif/plugin-warn-if-update-available 1.7.3 (core)",
                "@oclif/plugin-which 1.0.4 (core)",
                "@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)",
                "alias 2.1.0 (core)",
                "apex 1.1.0 (core)",
                "auth 2.2.2 (core)",
                "community 2.0.0 (core)",
                "config 1.4.14 (core)",
                "custom-metadata 2.0.0 (core)",
                "data 2.0.4 (core)",
                "generator 2.0.2 (core)",
                "info 2.0.1 (core)",
                "limits 2.0.1 (core)",
                "org 2.0.3 (core)",
                "salesforce-alm 54.6.2 (core)",
                "schema 2.1.1 (core)",
                "sfdx-cli 7.160.0 (core)",
                "sfdx-devops 0.4.6",
                "sfdx-heber 0.0.2",
                "sfdx-typegen 0.6.2",
                "sfpowerkit 4.2.11",
                "shane-sfdx-plugins 4.43.0",
                "├─ @mshanemc/plugin-streaming 1.1.7",
                "└─ @mshanemc/sfdx-sosl 1.1.0",
                "signups 1.2.0 (core)",
                "source 2.0.7 (core)",
                "telemetry 2.0.0 (core)",
                "templates 55.0.0 (core)",
                "trust 2.0.1 (core)",
                "user 2.1.0 (core)"
        ],
        "osVersion": "Windows_NT 10.0.19044"
}
@aheber aheber added the investigating We're actively investigating this issue label Jul 26, 2022
@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.

@peternhale peternhale added the bug Issue or pull request that identifies or fixes a bug label Jul 26, 2022
@git2gus
Copy link

git2gus bot commented Jul 26, 2022

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

@peternhale peternhale removed the bug Issue or pull request that identifies or fixes a bug label Aug 2, 2022
@peternhale
Copy link
Contributor

fix in version 7.162.0 of sfdx-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

2 participants