Hot answers tagged

4

You need to load webpart properties before you can read them. That is, var properties = webPart.get_properties(); currentCtx.load(properties); Then read the properties in success method. currentCtx.executeQueryAsync(...


2

To access SP.WebParts.WebPart Properties it need to be requested explicitly. In your example you could change the expression at the line: currentCtx.load(webPartDefs, 'Include(WebPart)'); with currentCtx.load(webPartDefs, 'Include(WebPart.Properties)'); Modified example var currentCtx = SP.ClientContext.get_current(); var pageFile = ...


1

It seems [ToolboxItemAttribute(false)] is missing on your partial class. Also ordering may be a issue but I am not sure about that. I am giving you a fully functional code snippet where I implemented webpart custom properties. Please update your code as per my below code. Let me know whether it works or not. using System; using System.ComponentModel; using ...



Only top voted, non community-wiki answers of a minimum length are eligible