SugarCRM

161

Solutions

280

Contributors

SugarCRM produces the web application Sugar, a customer relationship management (CRM) system that is available in both open-source and commercial open-source applications. Sugar's functionality includes sales-force automation, marketing campaigns, customer support, collaboration, Mobile CRM, Social CRM and reporting.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,

I need to create a trigger / stored procedure in MySQL that fires off each time a table is modified, does a select that potentially returns multiple results, then matches those results with a human readable name in another table, concatenates all the results into plain text, and then updates a field in yet another table. I am basically looking for an "UPDATE" version of "INSERT INTO".

Background to this is SugarCRM. We have a custom field in the main contact field for Outlook Categories, and that needs to be filled by the names of the target lists that contact belongs to.

So the basic update query would quite simple:
UPDATE contacts_cstm SET cat_type_c = 'XXXXX' WHERE id_c = 'YYYYY'. XXXXX is the concatenated value from the select query and YYYYY is a unique id that should be able to be extract the data from a field value in the altered/new record.

So the SELECT query looks something like this:
SELECT GROUP_CONCAT( DISTINCT prospect_lists.name ) FROM prospect_lists LEFT JOIN prospect_lists_prospects ON prospect_lists.id = prospect_lists_prospects.prospect_list_id WHERE prospect_lists_prospects.deleted = 0 AND prospect_lists_prospects.related_id = 'YYYYY'

Where YYYYY is the id number of the person who's record has changed, and the DISTINCT is just in case there are duplicate rows.

So I figure I need two triggers, one AFTER INSERT, and one AFTER UPDATE, on prospect_lists_prospects but after that I am starting to get lost. First of all, I think I can use …
0
Cloud Class® Course: CompTIA Cloud+
LVL 12
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Hi Everyone,

I have a question to find some simple clarification.
I did do a upgrade of VTiger 6.4 to 6.5 and get a deadlock error when creating a new lead. After researching I saw that it could have something to do with the vtiger_version.

I did restore it all back to Version 6.4 and all if running fine there. Before I retry the upgrade from 6.4 to 6.5 I noticed that the vtiger_version table indicated the following:
old_version: 5.4.0
current_version:  5.4.0

This VTiger install was initially installed on 5.4 years ago. Than it was upgraded to version 6 by and later to 6.4.

Long story short, my question is: As I am running version 6.4 now for many month, but what should the correct vtiger_version table say? Its clear it should be current_version:  6.4.0 but what should be in old_version? Should it be 6.0 since I uprated from 6 to 6.4 or should it contain the original installed version which was 5.4.0? or maybe 6.4.0 as this is what I run now.

I hope the question makes sense.
0
Hello,

You will have to forgive me here as I am in no way a sugar or php expert :)

I have just changed the IP of our sugar instance (web server and db) as part of a larger piece of work. I can no longer access the sugar site, instead I get a 'this page cannot be displayed' error.

Looking at the sugar log I see errors such as:

08/19/17 00:48:06 [1968][-none-][FATAL] Could not connect to server xxxxxx as xxxxxx.
08/19/17 00:48:06 [1968][-none-][FATAL] Unable to retrieve system settings Query Failed:SELECT category, name, value FROM config WHERE category = N'tracker'::: Database Is Not Connected

I have modified a php script to test connection to the database server using the creds specified in config files and it passes.

Name resolution on each server works fine.

I have been through various config files that I could find and replaced any legacy IP's but still get this error, there may be more config files to adjust but I have no idea where they are.

The environment is Windows Server 2008R2 and SQL Server 2008R2 (sorry!), separate servers.

Please do let me know what extra info you may need.

Please could someone help :)
0

SugarCRM

161

Solutions

280

Contributors

SugarCRM produces the web application Sugar, a customer relationship management (CRM) system that is available in both open-source and commercial open-source applications. Sugar's functionality includes sales-force automation, marketing campaigns, customer support, collaboration, Mobile CRM, Social CRM and reporting.

Top Experts In
SugarCRM
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!