• Venkat Koppolu *
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I am trying alternatives to export data and import data using salesforce cli and came across a scenario where I was able to export the custom metadata records but when I try to import the same to another scratch org I am finding CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY  entity type cannot be inserted.

{
    "records": [
        {
            "attributes": {
                "type": "TR1__mapping__mdt",
                "referenceId": "TR1__mapping__mdtRef1"
            },
            "DeveloperName": "LastName_DefaultValue",
            "Label": "LastName DefaultValue",
            "Language": "en_US",
            "MasterLabel": "LastName DefaultValue",
            "QualifiedApiName": "LastName_DefaultValue",
            "TR1__Def_Value__c": "UNKNOWN",
            "TR1__Field_API__c": "LastName",
            "TR1__Node__c": "Contact"
        }
]
}
I see that salesforce allows records deployments with ANT but was curious to know why they allowed export feature but import is not working using salesforce cli commands.

I am trying alternatives to export data and import data using salesforce cli and came across a scenario where I was able to export the custom metadata records but when I try to import the same to another scratch org I am finding CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY  entity type cannot be inserted.

{
    "records": [
        {
            "attributes": {
                "type": "TR1__mapping__mdt",
                "referenceId": "TR1__mapping__mdtRef1"
            },
            "DeveloperName": "LastName_DefaultValue",
            "Label": "LastName DefaultValue",
            "Language": "en_US",
            "MasterLabel": "LastName DefaultValue",
            "QualifiedApiName": "LastName_DefaultValue",
            "TR1__Def_Value__c": "UNKNOWN",
            "TR1__Field_API__c": "LastName",
            "TR1__Node__c": "Contact"
        }
]
}
I see that salesforce allows records deployments with ANT but was curious to know why they allowed export feature but import is not working using salesforce cli commands.

Hello, 

When I try to deploy a class to my Production organization using sfdx the error produced does not show enough details.
I am executing the command:
sfdx force:source:deploy -m ApexClass:ClassNameRepository -l RunLocalTests -u myOrgProd --json --loglevel error
Response error:
{
    "status": 1,
    "result": [
        {
            "error": "Unknown"
        }
    ],
    "name": "DeployFailed",
    "message": "Deploy failed.",
    "exitCode": 1,
    "commandName": "SourceDeployCommand",
    "data": [
        {
            "error": "Unknown"
        }
    ],
    "stack": "DeployFailed: Deploy failed.\n    at MetadataRegistry.initializeMetadataTypeInfos.then.then.catch.e (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\salesforce-alm\\dist\\lib\\source\\sourceApiCommand.js:64:31)\n    at tryCatcher (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\util.js:16:23)\n    at Promise._settlePromiseFromHandler (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\promise.js:517:31)\n    at Promise._settlePromise (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\promise.js:574:18)\n    at Promise._settlePromise0 (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\promise.js:619:10)\n    at Promise._settlePromises (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\promise.js:695:18)\n    at _drainQueueStep (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\async.js:138:12)\n    at _drainQueue (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\async.js:131:9)\n    at Async._drainQueues (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\async.js:147:5)\n    at Immediate.Async.drainQueues [as _onImmediate] (C:\\Users\\whernandez\\AppData\\Local\\sfdx\\node_modules\\bluebird\\js\\release\\async.js:17:14)\n    at runCallback (timers.js:705:18)\n    at tryOnImmediate (timers.js:676:5)\n    at processImmediate (timers.js:658:5)",
    "warnings": []
}
I upgrade to the following versions sfdx-cli / 7.30.13-9e204762d5 win32-x64 node-v10.15.3
and salesforcedx installed v47.3.7