• adknllewkj
  • NEWBIE
  • 20 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Trying to mass upload custom metadata type records using cmdt commands. The following code was working but now it isn't. I keep getting this error: 'The column Name is not found on the custom metadata'. But according to docs I've read, the name column is needed for creating the label and name for the record. Please help... I am just confused as to why the Name column is suddenly a problem.. This definitely was working and the only change i did was adding more data to the csv file... I also tried DeveloperName, Label and using the tag --namecolumn as well with no success.
 
Sfdx force:cmdt:record:insert --filepath /Desktop/test.csv --typename test__mdt  --inputdir /Documents/main/default/objects --outputdir /Users/4530206/Documents/main/default/customMetadata

test_mdt has two fields: "text__c" and "num__c"
test.csv has three columns: "Name", "text__c", "num__c"
Is there a way to check if a territory has a user assigned? I tried using UserTerritory2Associations to query by a TerritoryId and log 'doesnt exist' or 'exist' if the result is null or not. But it is only logging when the result isn't null so it seems like  New to Salesforce so I hope that makes sense!