Custom admin panels in v25.2

In previous versions of Sugar the recommended way of putting the clickable admin link in was to use the below which has worked for many years.

'javascript:void(parent.SUGAR.App.router.navigate("Opportunities", {trigger: true}));'

I have noticed in v25.2.0 that this is no longer the case, that works if you use the Search Admin Settings section but not if you scroll down the page and click the link directly.

It appears that the documentation still states to use the aforementioned way as per https://support.sugarcrm.com/documentation/sugar_developer/sugar_developer_guide_25.2/user_interface/administration_links/ however when you look at how the links are defined in a v25.2.0 system they are just set as `'#Opportunities'`. Is this going to be the new format and preferred setup going forward?

I noticed the below also works so wasn't sure if there was a problem with that so just wanted to get the official answer before we go about updating our packages.

'App.router.navigate("Opportunities", {trigger: true}));'

Parents
  •   do you know the answer to this? Happy to just mimic the 25.2 setup just wanted to make sure that is going to be the recommended format going forward to save having to update any packages we have twice

  • hi  ,

    I did a quick test here with our recommended code and it seems to work just fine, please take a look at this example below.

    did I get it wrong? can you double check and perhaps send a quick video with what you see?

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  •   This is not what we have seen. We have had several customers using a package that was installed either before upgrading or using a package that we know has been working for years, that since on 25.2.0 no longer works as you showed above. We had raised a ticket to your support team and they also told us to make the change from say 

    javascript:void(parent.SUGAR.App.router.navigate("eit_WatchdogLogs", {trigger: true}));

    to just `"#eit_WatchdogLogs` in `custom/Extension/modules/Administration/Ext/Administration/eit_WatchdogLogs.php`

    Being an ondemand version I don't have a local version to give you access to. I am happy to send you the package file if you wish.

  • Thanks  ,

    I'm also using ondemand instance for this test and I dont see the issue, this is the supported way (what you currently have in your package javascript:void).. 

    i could not identify any changes that would prevent it to work...

    could you please send in my email your package so I can install and investigate further?

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  • FYI I successfully replicated the issue by downloading an on demand instance and install one of our plugins using this kind of admin access, I did not dig into the reason it does not work anymore since we have an easy quick-fix.

    We took mesures to convert our admin links from javascript:void to # as suggested by support and Liam.

Reply Children