soap - Date filter in Microsoft Dynamics NAV webservice -


when sending filter webservice in php works fine, when need sort on dates encountered problem. need objects modified after date.

in page have date element, so:

<xsd:element minoccurs="0" maxoccurs="1" name="last_date_modified" type="xsd:date"/> 

and have tried solution explained here on so:

dynamics nav (navision) webservice readmultiple date filter

but our date format bit different, ours looks like: 2013-01-01

in our filter, have tried following:

array(     'field' => 'last_date_modified',     'criteria' => '20130101..' ) 

and other variations, doesn't return anything. if leave blank returns everything. have idea can do? if somehow stored last_modified_date bigint unix timestamp?

i've tested similar setup soapui , here i've got:

outgoing message:

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="urn:microsoft-dynamics-schemas/page/objlist"> <soapenv:header/>   <soapenv:body>        <obj:readmultiple>          <obj:filter>             <obj:field>date</obj:field>             <obj:criteria>&gt;=01012013</obj:criteria>          </obj:filter>          <obj:bookmarkkey></obj:bookmarkkey>          <obj:setsize></obj:setsize>       </obj:readmultiple>    </soapenv:body> </soapenv:envelope> 

it results in correct response (with 3 records have in base changed since january) response correct if put 01012013.. or 01.01.2013.. or 01/01/2013.. error returned in response 20130101..

in response field have value <date>2013-05-15</date> incorrect format location though.

so nav server waiting other date format in requests. check nav server's customsettings.config file see if has <add key="servicesculturedefaultuserpersonalization" value="true"/> key. if set "false" server work in en-us date , number format.

also check user personalization table in nav. if previous key set true nav try use language settings defined user in table.

if nothing helps try soapui find out if nav response correct direct message (see format above or feed soapui wsdl file).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -