I'm tried to insert or create new order like product and shipping details in salesforce,but i got get the exact table name for create order please help me name of the table i need to use and what parameter need to send..i tried some table name to select filed i referred in link


$query = "SELECT PricebookEntryId,OrderId,UnitPrice,ServiceDate,Quantity FROM OrderItem"; 
        $response = $this->salesforce->query($query);

but not working show error,please help me.. thx in advc


Welcome to SF.SE Raj. You may find the Object Reference to be a useful resource in sorting out your coding. Normally, when creating a new record, one does an insert. The order of the fields within a list for an object isn't critical so long as all the values for required fields are included.

Be aware that what's required can vary from Org to Org, particularly when custom fields have been added. Without knowing the schema for your org, its difficult to say exactly what problem you're encountering. You may want to try running a SOQL query from the Developer Console.

If you have Ajax Tools installed or use Workbench, you can also "explore" your org to see all the relationships between your objects which may help you sort out your problem, including discovering the names of all fields required to insert a new record.


I think the best option for placing an order in Salesforce from PHP is the Place Order REST API:


Your PHP application will need to authenticate against Salesforce first using either an OAuth Webserver, User-Agent or Username-Password flows prior to posting your order in a separate callout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.