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

fix: handle undefined in cmdt record creation #662

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

mshanemc
Copy link
Contributor

@mshanemc mshanemc commented Nov 27, 2023

it was possible to get undefined in the customField xml.

This change skips fields where the user provided no value.

@W-13055835@
forcedotcom/cli#2074
forcedotcom/cli#1714

closes Known Issue https://issues.salesforce.com/issue/a028c00000j5kO8AAI/custom-metadata-forcecmdtrecordinsert-command-is-creating-undefined-types-for-null-values-in-csv-file

@mshanemc mshanemc changed the title Sm/handle-undefined-in-cmdt-record-creation fix: handle undefined in cmdt record creation Nov 27, 2023
@shetzel
Copy link
Contributor

shetzel commented Nov 27, 2023

QA:
Ran the repro steps from the linked GH issue (created Dashboard_ID, etc.) and then ran:
sf cmdt record insert --filepath list.csv --typename Dashboard_ID --namecolumn Random_Value_Name__c (i.e., without the fix) and the command failed to create a valid Dashboard_ID type.
~/plugin-custom-metadata/bin/run.js cmdt record insert --filepath list.csv --typename Dashboard_ID --namecolumn Random_Value_Name__c (i.e., with the fix) and the command created a valid Dashboard_ID type.

@shetzel shetzel merged commit 60a63b0 into main Nov 27, 2023
13 checks passed
@shetzel shetzel deleted the sm/handle-undefined-in-cmdt-record-creation branch November 27, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants