public function createRecord($recordinfo, $module)
 {
     $newrecord = json_encode($recordinfo);
     $data = array('operation' => 'create', 'sessionName' => $this->session_data->sessionName, 'element' => $newrecord, 'elementType' => $module);
     $result = WSRequest::post($this->vtiger_ws_url, $data);
     if (!$result) {
         return false;
     } else {
         return $result;
     }
 }
 public static function connect()
 {
     global $sclient;
     session_start();
     $sclient = new soapclient2($GLOBALS['vtiger_path'] . "/vtigerservice.php?service=customerportal");
     $sclient->soap_defencoding = $GLOBALS['default_charset'];
     if (WSRequest::urlExists($GLOBALS['vtiger_path'] . "/vtigerservice.php?service=customerportal") === false) {
         header("Location: configuration/index.php?pe=errpath");
         die;
     }
 }