Add-in enabled before being added to role

SUGGESTED

I have an add-in that is installed in 2016 (v 11.00.0001) and without enabling the feature or adding it to a role certain aspects of the feature are automatically enabled.

The add-on is comprised of two different components, one amends the Supplier Details Form with some new buttons and an additional form that is added to the menu, the additional form doesn't get enabled and added unless the feature is enabled against a role. 

The add-in has been installed on different versions of Sage 2013 and 2015 and this doesn't appear to happen on these versions, all the functionality is disabled unless the feature is added to a role.

Is there something that is different on 2016 that enables features by default? 

Also, is there a way of being able to set menu's per user or role as any amendment appears to be set globally?

Thanks 

 

  • 0
    SUGGESTED
    You could remove the additional form within Menu Designer in the program, which will amend the role menu (by deleting it from the list), with the form amendments, i've never personally seen it (though i'm no developer) not displaying an amendment to a form for all. I would recommend talking to the developer of the add-in in this respect, because they will know on what they can and cant do. The structure of 2015 and 2016 is very similar so I'm surprised that there is a difference, though you can also use the Menu Designer to remove the form on 2015 (and Menu Design Mode in 2013). There is nothing in the standard front end of the program to hide new buttons on a form.
  • 0
    Yes, there is a difference in the way add-ins are deployed since v2016

    If the add-on includes at least one feature (ie. the new form), and one or more form scripts (ie. a change to a form):

    Up to v2015: the form scripts were only deployed if the feature was enabled for the user
    From v2016: the form scripts are always deployed

    If the add-on doesn't include any features, the scripts are always deployed.

    If the add-on also includes new menu options, these are always added to the default menu, but only shown if the relevant feature is authorised. As far as I know, v2016 doesn't have per user / per role menus.
  • 0
    Hi Geoff,

    Thanks for your response, this is as we thought having ran through this a number of times.

    Do you know of any way around this? we would like to be able to disable an addon against a role as not all users will require the addon so would like to see the original Sage form instead of our amended version
  • 0

    Not without development changes!

    The developer could add some code in the Supplier Details form script to only apply the changes if the user is authorised for the other feature (see below); alternatively, rather than amending the form, they could subclass it and create a new one - which of course would then be a different feature and could be authorised separately

    VB Code to check user's authorisation

    Imports Sage.MMS.SAA.Client
     Function UserIsAuthorisedForFeature(featureId As String) As Boolean
      For Each user As User In SAAClientAPI.GetUsersAuthorisedForFeature(featureId)
       If user.LogonName = Sage.Accounting.Application.ActiveUserName Then
         Return True
       End If
      Next
     Return False
  • 0
    This should be standard practice. Most 3rd party developers will not show form changes if the user is not enabled for the feature.