I want to enable/disable a ribbon button in display form of a list based on whether versioning is enabled or not.
In the EnabledScript
of CommandUIHandler
, I am specifying a javascript function which will check the versioning in the given list.
The problem is that there seems to be no way of getting reference of the current list as tokens like {ListId}
are not available in EnabledScript
. I also can't use SP.ListOperation.Selection
as it reurns null, which is quite obvious.