Hi all,
Just wanted to post info about something that cost me my Sunday night:
I used a SOAP client to connect to SugarCRM, to get Contact information. This client gave problems retrieving the list of Contacts. It gave an Null Reference (sort of a NullPointer) error (it's a .NET client)
Now, this client is closed source so my options for debugging were limited. I luckily found some ways it works, and some way it wouldn't. So I started testing possible causes. I tested the program with only a single record in the database and with a few, etc.
After a few hours I was positive that this was an data issue, not code. Because the database contents predicted the success or failure of the SOAP call. Now, it appears that a dash ("-") sign in the KEY component of a dropdown DOM causes Sugar UI to work perfectly, but really screws up SOAP actions.
I had this code:
..overriding the salation dom. The first line key "-blank-" caused all problems!!! Replacing '-blank-' with '' and setting all records to salutation = null fixed the problem.PHP Code:$GLOBALS['app_list_strings']['salutation_dom']=array (
'-blank-' => '',
'Dr.' => 'Dr.',
'Prof.' => 'Prof.',
'MSC' => 'MSc',
'BSc' => 'BSc',
'LLB' => 'LLB',
'LLM' => 'LLM',
'MBA' => 'MBA',
'BBA' => 'BBA',
'RA' => 'RA',
);
What have we learned?PHP Code:UPDATE <table> SET salutation = NULL;
SugarCRM's SOAP server component cannot handle dashes in dropdown keys.
What to do?
Modify Studio to reject dashes. Modify developer documentation to warn about problems when using dashes.
Now I already was pro-INT keys for dropdowns before all this. This is another reminder to myself to use just NUMBERS for dropdown keys...so I have myself to blame I suppose.


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks