davispeixoto / Laravel-4-Salesforce

Force.com Toolkit for PHP port for Laravel 4
MIT License
13 stars 16 forks source link

Insert Query issue #17

Closed bghodasara1994 closed 7 years ago

bghodasara1994 commented 7 years ago

I have implement this library

i am using this query for get data and its working fine: Salesforce::query("SELECT Name,created_at__c, fixati_idc FROM userc");

but insert query is not working can you help me with this: Salesforce::create("INSERT INTO user__c (name, created_at, fixati_id) VALUES ('Harshil2','10/18/2017 12:00 PM', '2')")

davispeixoto commented 7 years ago

Hey @bghodasara1994 , the underlying library (Force.com Toolkit) is not designed to accept this kind of operation. It is not a database handler.

The SOQL queries (SELECT only) can be used through the query api method, however, the other methods expect to receive SObjects instead - as the create method.

Here are some references for your convenience:

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_list.htm https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_list.htm https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sosl_intro.htm

I'm closing this issue as it is not related to the library itself, nor the wrapper provided by this package.