I have created a lead form using the example from the wiki
http://www.sugarcrm.com/wiki/index.p...tical_Examples
I have read on other threads about possibly needing $sugarEntry = true;
I have also seen the thread about security changes post 4.2 I believe doing checks for $GLOBALS['sugarEntry']
But I need some clarity on proper implementation of
$sugarEntry = true; or $GLOBALS['sugarEntry'] = true;
The example doesn't go this far indepth with anything involving sugarEntry.
Any help is greatly appreciated.
I added the top 2 lines based on various threads I have found in the forums. But neither of them seem to help.
HTML Code:<?php $sugarEntry = true; $GLOBALS['sugarEntry'] = true; require_once('include/nusoap/nusoap.php'); $soapclient = new soapclient('http://www.mysugarinstall.com/sugar/soap.php?wsdl',true); $user_auth = array( 'user_auth' => array( 'user_name' => 'my user name', 'password' => md5('my user name's password'), 'version' => '0.1' ), 'application_name' => 'soapleadcapture'); $result_array = $soapclient->call('login',$user_auth); $session_id = $result_array['id']; $user_guid = $soapclient->call('get_user_id',$session_id); $set_entry_params = array( 'session' => $session_id, 'module_name' => 'Leads', 'name_value_list'=>array( array('name'=>'first_name','value'=>$_POST['first_name']), array('name'=>'last_name','value'=>$_POST['last_name']), array('name'=>'status', 'value'=>'New'), array('name'=>'phone_work', 'value'=>$_POST['phone']), array('name'=>'account_name','value'=>$_POST['company_name']), array('name'=>'lead_source','value'=>'Web Site'), array('name'=>'description','value'=>$_POST['rfp_comments']), array('name'=>'assigned_user_id', 'value'=>$user_guid)) ); $result = $soapclient->call('set_entry',$set_entry_params); header("Location: " . $_POST['redirect']); ?>


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks