Skip to main content
8 events
when toggle format what by license comment
Nov 6, 2013 at 4:21 comment added xdumaine I'll check ClientContext, but I believe I've tried that and it was null as well. getSelectedItems however, always returns items that are selected with the checkboxes, and not with the web part connections.
Nov 6, 2013 at 4:19 comment added Benny Skogberg My idea was to follow the code through the process and see where you lose context. But I found another post, explaining the same, but using plain JavaScript instead: var ctx = SP.ClientContext.get_current(); var items = SP.ListOperation.Selection.getSelectedItems(ctx); I probably missed the ClientContext previous. Read the section Get Selected Item Context
Nov 6, 2013 at 1:49 comment added xdumaine No, could you explain how I would use that to help? My whole problem is that I don't know what property I'm looking for, not that I can't debug.
Nov 5, 2013 at 19:30 comment added Benny Skogberg Have you tried debugging with cksdev?
Nov 5, 2013 at 16:30 comment added xdumaine Well I would, except ctx.CurrentItem is null, like I said. It doesn't have any value, or any properties.
Nov 5, 2013 at 16:26 comment added Benny Skogberg @xdumaine Have you tried iterate through the properties of ctx.CurrentItem properties? for(prop in ctx.CurrentItem) { alert(prop + “ “ + ctx.CurrentItem[prop]) }
Nov 4, 2013 at 13:24 comment added xdumaine Can you explain how I would then get the item selected (say, in document.ready)? I'm not really sure what this does. I've tried accessing ctx.CurrentItem, but it's always null. How does this code help me solve my problem?
Nov 3, 2013 at 18:59 history answered Benny Skogberg CC BY-SA 3.0