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 ? 

, , , , , , ,

Parents
  • 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.

Reply Children
No Data