You need to sign in to do that
Don't have an account?
SOAP API Limit Exceed
Hi,
I have 10000+ records on my mysql database. Using php tool kit I am trying to insert them in salesforce,
How ever while doing so I am getting api Limit Exceed error. How can I optimise it, I am not using any batch job. just simple create function
You will need to create a batch process in PHP. The limit in a single create() is 200 objects.
You can:
1. load your data from a CSV and call create() on every 200 objects
2. manually create your data in the php file
3. Retrieve 200 records from mySQL directly and then call on create() and repeat the process again
Thanks
All Answers
You will need to create a batch process in PHP. The limit in a single create() is 200 objects.
You can:
1. load your data from a CSV and call create() on every 200 objects
2. manually create your data in the php file
3. Retrieve 200 records from mySQL directly and then call on create() and repeat the process again
Thanks
I am not much aware about php coding. but i am posting here is the one vb.net code example that will help you to otimise your code.
So you can convert the same in php to work in batch job insert process.
Private binding As apexPartner2015.SforceService---SOAP wsdl reference object
Dim sfContacts(dt.Rows.Count - 1) As apexPartner2015.sObject
Dim xmlDocumentObj As New XmlDocument
For I = 0 To dt.Rows.Count - 1 ----(dt is datatable contain 200 records return by query)
//field binding logic
xmlElementObj(0) = xmlDocumentObj.CreateElement("firstname")
xmlElementObj(0).InnerText = dt.Rows(I).Item("firstname")
xmlElementObj(1) = xmlDocumentObj.CreateElement("lastname")
xmlElementObj(1).InnerText = dt.Rows(I).Item("lastname")
binding.AssignmentRuleHeaderValue = Nothing
sfContact = New apexPartner2015.sObject
sfContact.type = CRMType
sfContact.Any = xmlElementObj
sfContacts(I) = sfContact
Next
Dim saveResults() As apexPartner2015.SaveResult = Nothing
saveResults = binding.create(sfContacts)
Please let me know if you need more details.