Accessing the propery bag from an elements.xml file
-
09-12-2019 - |
Question
I want to access some configuration data stored in the property bag. I want to access this information from a elements.xml file. This elements.xml file contains a Ribbon with Tabs and Buttons. Is there a way to do this? Or a way to access a static public string from an elements.xml file?
The Ribbon and its child controls are all inside a element.
Solution
Not in then xml, but when you create ribbon buttons you specify javascript to execute when clicked.
You then have two options:
- Use Client Object Model in this javascript to retrieve the property and do the navigation
- Navigate to a trampolin page which reads the property and redirects
OTHER TIPS
As far as I'm aware, there's no way to access the object model in that way from a static XML file. You'd need code to pull the property you're referring to.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange