0

I am using a software powered by SugarCRM. The reports I show are not very good so I decided to user Pentaho BI Suite. I already made all the business analitycs stuff (cubes, reports, saiku report, etc..), but I am having an issue, in SugarCRM database, the label's values of some dropdownlist (for example), are not storaged. Instead they are written in a .JS file y the sugar directory called sp_ve.js like this :

 SUGAR.language.SetLanguage('app_string',[JSON OBJECT WITH THE LABELS VALUES]) ;
 SUGAR.language.SetLanguage('app_list_strings',[JSON OBJECT WITH LABEL VALUES]);

Now, is there any way to insert those objects into tables, so I can use it in my OLAP solution in pentaho?, HOW? . If yes, how can I make this process work automatically, every time my users add new labels.

1 Answers1

0

First of all, all the dropdowns, text labels, etc. actually stored in <lang_key>.lang.php files under <sugar_root>/include/language/ and <sugar_root>/custom/include/language/ directories. And only then those labels become accessible with JavaScript used in SugarCRM UI. See this page for more information.

For similar situation of preparing SugarCRM database for analyzing with Tableau Desktop Professional I decided to use the following approach.

At the beginning all the dictionaries/mappings needed in files mentioned above were extracted into separate CSV files. You can do it with text editor of your choice using find/replace. Then those CSV files were imported into SugarCRM database as new tables - one table for each list. After that I used database view to join "data" table with "label map" table and used that view as a source for my analytical needs. Yes, it's not so elegant and dynamic solution. Moreover it needs a little hand work. But it solves the issue.

erop
  • 1,510
  • 1
  • 14
  • 27