• Net Tech International
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
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

 

I am working on integrating a system with Salesforce through the REST Api and I am having some issues with relationships. I was able to create the following structure in salesforce 

Opportunity
    ... Standard Fields...
    OpportunityTags__r (onetomany relationship to a custom product)

OpportunityTag
    - TagName
    - TagNumber

The problem that I am having is when I try to create/update a new Opportunity via REST including the OpportunityTags... I am sending the following JSON:

{
    "ownerId": "[OppOwnerId]",
    "AccountId": "[OppAccountId]",
    "CloseDate": "2016-08-16",
    "Name": "[NameOfOp]",
    "StageName": "Prospecting",
    "Opportunity_Tags__r": [
      {
        "TagName__c": "[TagName]",
        "TagNumber__c": "[##]"
      },
      ....
    ]
}

I have confirmed that I can retrieve the Opportunity and its Tags using the sub-select (SELECT [fields] FROM Opportunity_Tags__r) so the relationship is there and it's working. The problem that I get when I send that REST I get the following error:

"[{"message":"QueryResult must start with '{'","errorCode":"JSON_PARSER_ERROR"}]"

If I remove the Opportunity_Tags__r portion of the JSON the opportunity gets normally created.

What am I missing in order to create/update objects with an array of childs included?

I am trying to setup the OAuth process to get the access_token, specifically in PHP using this example (http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php). However, I don't know how to avoid the "Allow Access" page that shows up, I would like to be autimatically allowed so the application can continue and get the access_token... It would be a pain to have to manually allow access on every system I am planning on implementing this integration.. What am I missing?
I am trying to setup the OAuth process to get the access_token, specifically in PHP using this example (http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php). However, I don't know how to avoid the "Allow Access" page that shows up, I would like to be autimatically allowed so the application can continue and get the access_token... It would be a pain to have to manually allow access on every system I am planning on implementing this integration.. What am I missing?
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