Hi GuysI'm currently trying to get Web Services to work with php. As far as i can see i can login in with no problems. But when i try to do a search for all leads for a certain sales rep, im getting nothing returned. Here is my code for the HTML based login form, and my php code. (which is based on the Netsuite example code) <html><body> <h4>Login to NetSuite WebServices WebSite</h4> <form action="login.php" method="post"> Email: <input name="email" type="text" /><br> Password: <input name="password" type="password" /><br> Account: <input name="account" type="text" /> <br> Role #: <input name="role" type="text" /> <br> Rep #: <input name="rep" type="text" /><br> <input type="submit" /> </form> </body></html>
[PHP]<?require_once('lib/nusoap.php');require_once('lib/nsLib.php');$client = new soapclientw('https://webservices.netsuite.com/services/NetSuitePort_2_0',false);foreach ($_COOKIE as $cName => $cValue)$client->setCookie($cName, $cValue);$result = login($client,$_POST['email'], $_POST['password'], $_POST['account'], $_POST['role']);if ($result['sessionResponse']['status']['!isSuccess']){ $cookieStr = 'Cookies:<br>'; foreach ($client->cookies as $cookie) { $cookieStr .= 'Cookie Name: ' . $cookie['name'] . '<br>Cookie Value: ' .$cookie['value'] . '<br><br>'; setcookie($cookie['name'], $cookie['value']); }?><html><body><? echo '<h2>Login Successful!</h2><br>' . '<br>';$rep = $_POST['rep'];$search = new nsSearchField('SearchStringField','salesRep','equalTo', $rep);$repSB = new nsSearchBasic('CustomerSearchBasic', array($search));$result = searchBasic ($client, $repSB, 10, false);if ($result['searchResult']['totalRecords'] == 0){ print 'No leads assigned to ' . $rep;}else{ foreach ($result['searchResult']['recordList']['record'] as $lead) { $addy = $lead['addressbookList']['addressbook']['addr1']; }}?><?}else{ echo '<html><body>'; echo '<h2>Login FAILED</h2>';}?></body></html>[/PHP]If anyone can spot something silly ive done or missed, id really appreciate a kick/nudge in the right direction!Thanks In Advance Guys!