Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, Need help in establishing connection to Salesforce using Oauth. Once connection is established, I need to retrieve certain filed values from multiple objects and do certain manipulation(Calculation) and load it back to Salesforce.
For this I tried to design a Talend Jobs but no luck:
In TJavaRow__1, we are geeting access_token. But I dont Understand how do the connection established So that I can retrive Filed values form Multiple Object.
Please advice me on this.
Hi there!
What's the error you're getting from Salesforce?
What I usually do here is add the OAuth-Token as a header parameter for plus the token and it works fine.
Hi douglaszickuhr Thanks for quick reply. below is the same error I got even I tried the way you did:
It will we helpful for me if you give the steps you followed in order to establish the connection and to retrieve some of the objects filed values.
Thanks for replying.
Hello
@mitesh089 wrote:
Hi douglaszickuhr Thanks for quick reply. below is the same error I got even I tried the way you did:
It will we helpful for me if you give the steps you followed in order to establish the connection and to retrieve some of the objects filed values.
Thanks for replying.
First step is request the token from your server. After that, just save it on your globalMap. You need to make sure you're extracting just the token String. It seems on your screenshow you're printing a JSON.
I found some information on Internet about how to set the connection to Salesforce:
//set the token in the header gm.setRequestHeader("Authorization", "Bearer "+accessToken);
What you need to do is something like that:
Please, try that and make sure that nobody is accessing the target software with the same user as you're using on Talend.
Hi douglaszickuhr, I'm already getting Token like "00D3EB009508zmi!ARoAIFMBtJFr2CQ2SLGyNBt_eyBBlWFEQolWId0Ycl.CZP9b3qaw46AxbmQiv0ISmnEUKFHy78_iazG3fQ8eAj38bybci3II"
Is this not correct Format?
Once you get token then how to get salesforce connection. Please let me know if some thing I'm missing.
That should work.
In your tRestClient advanced options add the following header param:
Please reach me out on douglaszickuhr on Skype if you're not able to go ahead. It's a pleasure to help.
did you fix the problem, if yes tell me how you did. thanks