I'm having some trouble with my PHP/SOAP form that's supposed to enter Data into sugarcrm.
We used it to create Leads until now and it worked flawless. Since we do not want to use the Lead module anymore I tried to edit the form so SOAP creates a new Contact and a new Account instead.
Creating a contact works fine with a few modifications but SugarCRM refuses to write into Accounts via my SOAP calls. I'm no expert but I can't find anything on the subject. Do you guys have any ideas?
It's hard to post code since I can't Pinpoint any crucial passages. In essence it comes down to this:
this worksCode:$sugar->set_entry("Contacts", $sugar->fromAssoc($data_contact));
this doesn'tCode:$sugar->set_entry("Accounts", $sugar->fromAssoc($data_account));
Switching the arrays has no effect and all other default-modules work as well (Leads, Opportunities, etc.)
here's what fromAssoc does
Are there any known problems or bugs regarding this?Code:function fromAssoc($array) { $multi = array(); while(list($name, $value) = each($array)) { $multi[] = array("name" => $name, "value" => $value); } return $multi; }
Also I was thinking about working around the problem by writing directly into the database is there any way to do this (I know the basics of writing into the DB, but I have no clue what I'd have to pick for the "id" column)?


LinkBack URL
About LinkBacks



Reply With Quote



Bookmarks