[SalesForce] How to i Insert Data in Salesforce using WSDL file of Salesforce using Query

Query :

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');

I can get data using "Select Query " in Salesforce WSDL file.
At same way can i use query based CRUD Operations in Salesforce.

QueryResult queryResult = null;
String SOQL = "";
string productid = "";   
SOQL = "select Id from Product2 where ProductCode = 'Test'";
queryResult = sfdcBinding.query(SOQL);

Best Answer

SOQL is query only. It won't perform inserts, updates, or deletes. Those are referred to as Data Manipulation Language (DML) operations instead and are handled by separate API methods.

Instead you should use create() or upsert() to create new records via the APIs.

Related Topic