how to make a cloud compatible studio customization for enums

Hi,

is there a way to modify the studio view "modification of a field" in order to add some custom properties to the vardefs while being cloud compatible ?

As of now we were using an admin view and the method "array_to_file" to push our custom properties into a dedicated vardef file, But the recent modifications of the function's black list makes us reconsider how we are doing this.

Any ideas ? 

, , , , , , ,

  • Unfortunately Studio layout and engine are not quite upgrade safe. We had implemented some customization on Studio behavior some time ago but it were painful to keep it up to date.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thanks for this answer, we were afraid of it, we just hoped we missed an obvious easy way to do it.

  • Alexandre,

    Actually, if I have understood your requirement to add a custom attribute to the Studio field editor properly, I think there may be a way to implement it. I have not used this technique but in theory overrides should work the same as for custom fields.

    In the documentation here: https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_10.3/Cookbook/Creating_Custom_Fields/ the process for creating a custom field type is described. In there it explains how the Studio field attributes are set out using Smarty template files. I believe that you ought to be able to extend a core file in there by adding a ./custom/... version of it and making you changes in there. I would start by looking at one of the core files - say: ./modules/DynamicFields/templates/Fields/Forms/currency.tpl - and seeing how that implements the inclusion of the "Enable Range Search" attribute in the Studio field modification layout. You can see in there that the .../coreTop.tpl and .../coreBottom.tpl are included to bring the standard attributes in as well.

    The documentation uses the "ext1" & "ext2" attributes for a custom field but I would expect you can also include specific other attributes by defining them in a custom Extension vardefs file as well.

    I would have a go (locally at first!!) at following the documentation there and see if that achieves what you are after. I would like to find out if this works at least :) If it does, then it would satisfy the cloud-based solution criteria for you and would be (reasonably) upgrade safe. You would of course have to track future changes to core files and include them in your custom version but that applies to any override like this.

    Thanks,

    JH.

  • Alexandre,

    Sorry, I should have explained my example better. I used "currency.tpl" as an example because it is one of the simpler files. You can also check in ./modules/DynamicFields/templates/Fields/Forms/enum.tpl to see how your proposed changes might fit in Slight smile

    Thanks,

    JH.

  • Dear and ,

    we are aware of the custom fields possibilities that will solve this issue.

    But, on the other hand, custom fields are currently not correclty handled in the report section or though Sugar BPM (and I am not sure about how they are handle with external solutions like Sugar Connect, Market etc.).

    This is why we tried to keep the core ENUM field that fits with our expectation for admin settings, edition, reporting etc. But, for graphical purpose, we created a custom module to specify in which color each option must be displayed.

    The result is an additionnal vardef fields with custom properties that should be handled in a proper way through a custom HBS.

    The problem is that, on the cloud, we canno't create "on fly" custom vardefs file, neither use the ext_ properties for that.

    I don't know if I am clear enough but I will glad to answer to all your question in order to find an cloud compatible and upgrade way solution to solve this problem.

    Many thanks,

    Fred