Is this possible?
I developing an app that pulls data via Web Services and storing it in a local db.
Everything is working fine except that the returned records are ordered by internalId and I need to order them by lastModifiedDate. This is in case a crash/error/program stoppage, we can query the local db for the latest lastModifiedDate and continue on pulling the next oldest record.
Here is the SOAP I'm using for the initial pull. Next pull would be the lastest lastModifiedDate from the local db so we can just pull new/changes.
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body> <platformMsgs:search xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s1="urn:common_2_6.platform.webservices.netsuite.com" xmlns:s0="urn:sales_2_6.transactions.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:platformCore="urn:core_2_6.platform.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2_6.platform.webservices.netsuite.com"> <platformMsgs:searchRecord xsi:type="s0:TransactionSearch"> <s0:basic> <s1:type operator="anyOf"> <platformCore:searchValue>salesOrder</platformCore:searchValue> </s1:type> <s1:lastModifiedDate operator="after"> <platformCore:searchValue>1969-12-31T18:00:00-06:00</platformCore:searchValue> </s1:lastModifiedDate> </s0:basic> </platformMsgs:searchRecord> </platformMsgs:search> </SOAP-ENV:Body></SOAP-ENV:Envelope>
This returns 43 pages of Sales Orders ordered by internalId. There is no way that th program will be able to pull all 43 pages successfully so I need to chunk it.But from looking at the first 1000 records:id lastModifiedDate 5636 2005-07-12T16:27:00.000-07:00 5637 2005-07-28T08:03:00.000-07:00 6346 2005-07-28T08:03:00.000-07:00 6640 2005-07-28T08:03:00.000-07:00 6641 2005-07-28T08:03:00.000-07:00 6968 2005-07-12T16:27:00.000-07:00 7758 2006-08-30T13:16:00.000-07:00 8087 2005-07-28T08:06:00.000-07:00 8245 2006-08-30T13:16:00.000-07:00 8318 2005-08-08T14:28:00.000-07:00 8399 2005-08-11T08:56:00.000-07:00 8400 2007-01-11T06:17:00.000-08:00 8540 2005-07-12T16:27:00.000-07:00 9195 2005-07-12T16:27:00.000-07:00 9326 2007-05-10T08:04:00.000-07:00 9542 2005-07-12T16:27:00.000-07:00
I'm going to get 2007 data before all the 2005 data is returned and no way to know which records I need to pull next:(Is there a sort by available?Thanks,Shanon