Notes about Sugar Lead Capture
- Line break characters are converted to break tags in the email compose window. Not sure where this is happening, but the problem is copying text from OOo into Sugar--lines have arbitrary breaks in them. Solution: copy/paste raw HTML (we did this from PHPMyAdmin) into a temp file, strip newlines from the temp file, copy the file to the clipboard and finally back into the raw HTML: dump into service.txt
Things we needed to move: custom/include/language/en_us.php
Also, this update completely broke the email template functionality. Is this something meant for the Pro version only? Code comments seem to indicate so. Anyway, restoring the functionality wasn't too difficult. We found the old script in the version 3.0.1b source code, and copied it into the appropriate template, restoring the missing JavaScript function. We edited the script to also insert the html version of the mail, and used the new HTML_area plug-in's native method to get it to render properly. So to get email template functionality working again, add this script block somewhere in modules/Emails/EditView.html:
The one drawback with this patch is that it makes our free/busy info private. We'll have to look into patching the patch to allow public viewing of free/busy, while preserving private viewing of ics. Patched.
So now, we publish free/busy information from Evolution, using the URL listed in the account page in SugarCRM. We then subscribe to the same URL as a WebDAV calendar, except changing the type from "vfb" to "ics", and our Sugar calls now show up in our Evolution calendar. This list also shows up in Thunderbird, in the Mozilla Calendar extension.
That's one step closer to the killer small business calendar system... Scheduled Jobs (SugarCRM 4.0)
We had trouble getting scheduled jobs to work, when configuring inbound email. There were two main issues: a permissions issue on a directory where the job creates a temporary PID file, and our SSL certificate, which isn't recognized by the Curl library.
Issue 1 cropped up because we ran the cron job as a normal user. The first time it ran, it created a directory with default permissions, which prevented Apache from writing to it. So after running the cron job the first time, the fix was to chmod 777 cache/modules/*.
Issue 2 took adding the Curl option to not verify SSL certificates. This was in modules/SchedulersJob/SchedulersJob.php, inserting at line 168: Freelock fix for freessl
- Edit /etc/asterisk/manager_custom.conf and create or modify a user to allow access from the SugarCRM box, either by subnet or host. The secret is the password you use to authenticate the call request.
- Copy the callme.php script and the phpagi directory from /var/www/html/crm to your regular SugarCRM installation.
- Edit the callme.php script as follows: Change the include path at the top of the file to point to your phpagi directory.
- Now it's time to edit the Sugar files. Find the {PHONE_WORK}, {PHONE_HOME} blocks in modules/Contacts/DetailView.html. There are four of them, for work, mobile, home, and other. These represent phone number types 0, 1, 2, and 3 respectively. Immediately after each block, add a non-breaking space and a link to the callme script (change the type to match the number you're showing): {PHONE_HOME}
Note that the callme script looks up in the Sugar contact database directly. It'll need some modification to get it to look up in the Accounts or Leads table--right now this only works for contacts, and only in the Contacts module or in a search--for some reason, it's not appearing in contacts listed in the Account module. Also, in Sugar 3.5.1, anyway, the "Call" link appears whether there's a number there or not...
But you now have single-click dialing from Sugar! Migrating SugarCRM to Trixbox
We recently got new hardware for Asterisk, and installed the latest Trixbox. Because it's a nice speedy machine, we decided to move our main SugarCRM database over to it and run it there.
Here's what we did: Upgrade both the old (original) Sugarcrm and new (Trixbox) SugarCRM to the same version (at this writing, 4.2.1a).