6

I have tried 2 to 3 possibilities of date formats for the "Start_Date" like

  1. 30-05-2018
  2. 05-30-2018
  3. 30/05/2018

but I am getting the response as

The value "30-05-2018" can't be evaluated into type Date.

The below is my function

public function getPriceList($customer_number){
    $url = 'Page/CustomerPrices';
    try {
        $response = new \stdClass();
        $response->status = false;
        $options = [
          'soap_version' => SOAP_1_1,
          'connection_timeout' => 120,
          'login' => env('MICROSOFT_DYNAMICS_NAV_USERNAME', ''),
          'password' => env('MICROSOFT_DYNAMICS_NAV_PASSWORD', ''),
          'exceptions' => true,
        ];
        $soapWsdl = env('MICROSOFT_DYNAMICS_NAV_URI', '').$url;
        $client = new SoapClient($soapWsdl, $options);
        $response->data = $client->ReadMultiple(['filter'=> [],'Start_Date' => "30-05-2018",'Cust_No'=>$customer_number,'Name'=>'Testing','Price_Comments'=>'','setSize'=>'1']);
        $response->status = true;

    }catch (Exception $e) {
        $response->data = $e->getMessage();
    }
    return $response;
}
  • 1
    and the one you have not tried is the one most used in programming "Y-m-d". – Andreas May 30 '18 at 05:34
  • thanks @Andreas , but now I am getting the following error from NAV. **A transaction must be started before changes can be made to the database.** – Sreejith Ezhakkad May 30 '18 at 06:52
  • did u run the "ReadMultiple" function once in NAV? This error u now get is a nav error. im sorry cause made a new comment. i can't response on the first one. cheers – GUBLAZ Aug 21 '19 at 08:58

0 Answers0