davispeixoto/Laravel-5-Salesforce

How to link credentials to a specific connected app ?

Closed this issue · 1 comments

According to your configuration requirement

    'username' => env('SALESFORCE_USERNAME'),
    'password' => env('SALESFORCE_PASSWORD'),
    'token' => env('SALESFORCE_TOKEN'),
    'wsdl' => storage_path('app/wsdl/enterprise.wsdl.xml'),

It works perfectly fine, but how do I know which app it is connected to.


I've tried

Route::get('/', function() {
    try {
        dd(Salesforce::query('SELECT Id, Name, Phone FROM Account'));
        echo print_r(Salesforce::describeLayout('Account'));
    } catch (Exception $e) {
        Log::error($e->getMessage());
        die($e->getMessage() . $e->getTraceAsString());
    }
});

I got

QueryResult {#163 ▼
  +queryLocator: null
  +done: true
  +records: array:4 [▼
    0 => {#165 ▼
      +"Id": "0015000001BZAMEAA5"
      +"Name": "Test Associates (for testing)"
    }
    1 => {#166 ▼
      +"Id": "0015000001AMomQAAT"
      +"Name": "Acme (Sample)"
      +"Phone": "(212) 555-5555"
    }
    2 => {#167 ▼
      +"Id": "0015000001AMomRAAT"
      +"Name": "Global Media (Sample)"
      +"Phone": "(905) 555-1212"
    }
    3 => {#168 ▼
      +"Id": "0015000001AMomSAAT"
      +"Name": "salesforce.com (Sample)"
      +"Phone": "(415) 901-7000"
    }
  ]
  +size: 4
  +pointer: 0
  -sf: SforceEnterpriseClient {#160 ▶}
}



I have more than 1 connected apps in my salesforce account, and I want to connect to that specific one.
How will I do that ? Is your package is capable of doing that ?

After I created my connected app, I have access to :

#SALESFORCE_CONSUMER_KEY=******
#SALESFORCE_CONSUMER_SECRET=******
#SALESFORCE_CALLBACK_URI=http://localhost:8888/sf

Any hints on all of these, will be much appreciated !

Hi @bunlongheng , I really didn't understand your question.

Do you have 2 Salesforce Accounts? And what do you mean by connected apps? Did you mean apps/plugins from salesforce market place?