Adding new fields to layouts

In Studio when I add new fields to a specific layout - for example linked to a dropdown, I can see them when the criteria is met which is great, but when I switch back to Default Layout Save and Deploy (as I am testing) - then I go back into the Layout that I added the field to to continue testing it is no longer there and I have to make all my layout changes again - why do they not stay ?

Parents
  • Hi Olivia,

    The option to "restore default layout" means you are removing all customizations and going back to the layout defined when the module was created.

    From a code standpoint, the Extension framework for sugar has default layouts are stored in 

    /modules/<module Name>/clients/base/views/.

    while the custom ones are in 

    custom/modules/<module Name>/clients/base/views/.

    When you put your custom field in the layout via Studio you are adding the field to the custom directory, the framework then knows to ignore the view in the core modules directory and replace it with the one in custom/modules

    When you select "restore default layout" you are essentially deleting the version you had in custom so the system uses what is in the core directory. It does not save the version that was in custom.

    I am not sure why you would need to move back and forth between your customizations and the default but perhaps one way do to that is to save your custom files so you can add/remove them as needed, or simply rename the custom file with a .tmp at the end to "deactivate" it, note that you need a QRR each time you remove/add them or rename them for the change to take effect.

    I hope this helps,
    FrancescaS

  • Hi 

    I am not choosing Restore Default Layout - I am just switching back to the Standard Layout and Deploying it for the users - do you understand what I a doing?

    So I am making test changes to the layout but obviously there are others using the system too so when I am temporarily finished I switch back to the normal layout

  • So I make changes to the above layout and deploy them and all is ok.

    Then I switch back to Layout in screen shot below

    When I go back into layout in top screenshot the previous changes are gone

  • Hi  ,

    When you are changing the 'Layout determined by' option, you are changing how the layout is configured so it is expected it will lose the dropdown layout changes you made once you save & deploy the standard layout configuration. 

    With that said, I would expect that save & deploying a dropdown-based layout would create an entry in the record history options to give you a restore point via the 'View History' button in Studio. That does not occur in my tests so you have no way to restore a dropdown-based layout from a prior configuration. I recommend raising that as a support case to confirm the defect. 

    Chris

Reply Children