Hello,
I'm glad to hear you like the platform and that you managed to get ChainedSelect working.
My understanding is that you've left the Status field, but made it a chained select to another field you created, is that correct?
If so, then by all means, there is going to be quite a problem with the leightbox and not something that can be fixed in a straightforward manner.
First, it'd be great if you could redirect the display callback of the Status field to a method in your Custom module. That way you avoid any further problems on updates, when the code will be overwritten with newer version. I don't know how much of a coder you are, so I'll leave it at that for now - if you feel you can manage that, we can help you further with that - if not, you can start by editing the code you see in SalesOpportunitiesCommon_0.php
The method you noted, Utils_CommonDataCommon::get_translated_array is nothing more but extracting a CommonData array and translating it through our translations system. It doesn't really require you to translate anything, it just allows others that may use the module to see translated versions of Statuses, instead of English ones. For all purposes, you should be using Utils_CommonDataCommon::get_translated_array here. The one thing you will have to change is the table name (argument) that is being passed to this method. Basically, this should be the name of the table that holds your current statuses.
But with my assumption in mind, that it's a chained select, you will need more than that. Depending on the Type of SalesOpportunity, different selection of Statuses should be available. I can't test this quickly right now, but the following changes should do the trick:
In display_status() method, change the line:
$prefix = 'crm_salesop_leightbox';
to
$prefix = 'crm_salesop_leightbox'.$record['type'];
Instead of
type put the name of the field the Status depends on. I'll just assume it's called
type from now on, just make sure to adjust it in your code.
Next thing you will have to change is the
$status = Utils_CommonDataCommon::get_translated_array('Premium/SalesOpportunity/Status');
Assuming that Statuses are placed in different table, you will have to do something like this:
$status = Utils_CommonDataCommon::get_translated_array('Name/Of/Type/Array/'.$record['type']);
It is - you should use the Type CommonData array name from chain select, add / and then the SalesOpp type. Next thing:
self::drawLeightbox($prefix);
change to
self::drawLeightbox($prefix, $record['type']);
And finally, change the method drawLeightbox():
Add one more argument to the method:
public static function drawLeightbox($prefix, $type) {
and be sure to use the right table, some lines down:
$status = Utils_CommonDataCommon::get_translated_array('Premium/SalesOpportunity/Status', true);
change to
$status = Utils_CommonDataCommon::get_translated_array('Name/Of/Type/Array/'.$type, true);
And I believe this should be just enough to get you going with your Statuses. Feel free to ask any questions if any part is unclear and if you end up getting an error, it'd be best if you posted the error message and attached (zipped) your Common_0.php where the code is placed.
Again, in the end it's best to place that code in your Custom module, but you can worry about that once you get it working by modifying SalesOpportunities directly.
Hope this helps!
Arek