+ Start a Discussion
Abhay RathoreAbhay Rathore 

Salesforce database integration

In my production organization I am facing Apex SOQL limit exception (too many soql queries 101). I tried lot of ways but not able to resolve it. Now I want to use Oracle cloud or other PaaS platform to replace SOQL with the data returned by REST or SOAP . Trying to impleatment this logic:-
Step 1)  Use metadata api to send all salesforce data to other platform
Step 2)  Use REST/SOAP to get all the data from third party(Oracle Cloud/Heroku).
Step 3)  Replace SOQL with this data.

I really have no idea how to start this.... any suggestion or help ?? 

 
CyberJusCyberJus
This sounds like a lot of work to get around SOQL query limit exception. I know you said you tried already, but you may want to look at that again. 100 queries is a lot to run in a single transaction if your code is properly bulkified. 

Regardless, if you want to send your data to another system, you cannot use the metadata api, that is only for metadata, not actual data. You probably want to use the Bulk API to load large amounts of data. You will need some sort of batch process to pull this data to your target system if you want to do it on a regular basis. Then you use the api of your target system to pull some data when you want to use it. Trying to do that all in one transaction will probably result in timeouts, so i would not really recommend that.