paleagha Posted January 7, 2010 Share Posted January 7, 2010 Hi, Is there a way to update client custom fields using the updateclient API? I have tried following codes with no luck! Test 1 $postfields["action"] = "updateclient"; $postfields["password2"] = $_REQUEST["password"]; $postfields["clientid"] = $_REQUEST["userid"]; $postfields["firstname"] = $_REQUEST["firstname"]; $postfields["lastname"] = $_REQUEST["lastname"]; $postfields["email"] = $_REQUEST["email"]; $postfields["companyname"] = $_REQUEST["companyname"]; $postfields["groupid"] = $_REQUEST["groupid"]; $postfields["status"] = $_REQUEST["status"]; $postfields["address1"] = $_REQUEST["address1"]; $postfields["country"] = $db->getOne("rsft_Country","Symbol","Name='".$_REQUEST["countryname"]."'"); $postfields["state"] = $db->getOne("rsft_State","Symbol","ID='".$_REQUEST["state"]."'"); $postfields["city"] = $_REQUEST["city"]; $postfields["postcode"] = $_REQUEST["postcode"]; $postfields["phonenumber"] = $_REQUEST["phonenumber"]; $postfields["customfields"] = array(1=>$_REQUEST["celno"], 2=>$_REQUEST["faxno"], 3=>$_REQUEST["partnerid"], 4=>$_REQUEST["referredby"]); Test 2 $postfields["action"] = "updateclient"; $postfields["password2"] = $_REQUEST["password"]; $postfields["clientid"] = $_REQUEST["userid"]; $postfields["firstname"] = $_REQUEST["firstname"]; $postfields["lastname"] = $_REQUEST["lastname"]; $postfields["email"] = $_REQUEST["email"]; $postfields["companyname"] = $_REQUEST["companyname"]; $postfields["groupid"] = $_REQUEST["groupid"]; $postfields["status"] = $_REQUEST["status"]; $postfields["address1"] = $_REQUEST["address1"]; $postfields["country"] = $db->getOne("rsft_Country","Symbol","Name='".$_REQUEST["countryname"]."'"); $postfields["state"] = $db->getOne("rsft_State","Symbol","ID='".$_REQUEST["state"]."'"); $postfields["city"] = $_REQUEST["city"]; $postfields["postcode"] = $_REQUEST["postcode"]; $postfields["phonenumber"] = $_REQUEST["phonenumber"]; $postfields["customfields1"] = $_REQUEST["celno"]; $postfields["customfields2"] = $_REQUEST["faxno"]; $postfields["customfields3"] = $_REQUEST["partnerid"]; $postfields["customfields4"] = $_REQUEST["referredby"]; Thank you! 0 Quote Link to comment Share on other sites More sharing options...
battisti Posted April 28, 2010 Share Posted April 28, 2010 Hi, Is there a way to update client custom fields using the updateclient API? I have tried following codes with no luck! Test 1 $postfields["action"] = "updateclient"; $postfields["password2"] = $_REQUEST["password"]; $postfields["clientid"] = $_REQUEST["userid"]; $postfields["firstname"] = $_REQUEST["firstname"]; $postfields["lastname"] = $_REQUEST["lastname"]; $postfields["email"] = $_REQUEST["email"]; $postfields["companyname"] = $_REQUEST["companyname"]; $postfields["groupid"] = $_REQUEST["groupid"]; $postfields["status"] = $_REQUEST["status"]; $postfields["address1"] = $_REQUEST["address1"]; $postfields["country"] = $db->getOne("rsft_Country","Symbol","Name='".$_REQUEST["countryname"]."'"); $postfields["state"] = $db->getOne("rsft_State","Symbol","ID='".$_REQUEST["state"]."'"); $postfields["city"] = $_REQUEST["city"]; $postfields["postcode"] = $_REQUEST["postcode"]; $postfields["phonenumber"] = $_REQUEST["phonenumber"]; $postfields["customfields"] = array(1=>$_REQUEST["celno"], 2=>$_REQUEST["faxno"], 3=>$_REQUEST["partnerid"], 4=>$_REQUEST["referredby"]); Test 2 $postfields["action"] = "updateclient"; $postfields["password2"] = $_REQUEST["password"]; $postfields["clientid"] = $_REQUEST["userid"]; $postfields["firstname"] = $_REQUEST["firstname"]; $postfields["lastname"] = $_REQUEST["lastname"]; $postfields["email"] = $_REQUEST["email"]; $postfields["companyname"] = $_REQUEST["companyname"]; $postfields["groupid"] = $_REQUEST["groupid"]; $postfields["status"] = $_REQUEST["status"]; $postfields["address1"] = $_REQUEST["address1"]; $postfields["country"] = $db->getOne("rsft_Country","Symbol","Name='".$_REQUEST["countryname"]."'"); $postfields["state"] = $db->getOne("rsft_State","Symbol","ID='".$_REQUEST["state"]."'"); $postfields["city"] = $_REQUEST["city"]; $postfields["postcode"] = $_REQUEST["postcode"]; $postfields["phonenumber"] = $_REQUEST["phonenumber"]; $postfields["customfields1"] = $_REQUEST["celno"]; $postfields["customfields2"] = $_REQUEST["faxno"]; $postfields["customfields3"] = $_REQUEST["partnerid"]; $postfields["customfields4"] = $_REQUEST["referredby"]; Thank you! after the update to the new version 4.2 this function break and now the update client api not works! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.