I'm looking for a new way to throw some tracking into list-based user actions (i.e. through ECB) and I stumbled across SP.ClientRuntimeContext.add_requestSucceeded (see SP.ClientRuntimeContext.add_requestSucceeded(value) Method).

The challenge is that MSDN is more of a function list than documentation. The example provided is only


What is passed in to value? Is it a static value or can it be a function that's executed? Ideally, I could pass in a function that makes an AJAX call that contains specifics about the list element (and only be passed on list item ECB's not headers or such).

Am I barking up the wrong tree?

Clarification: if there's a better way to add an AJAX call to default ECB menu options that ensures the call is made before any HREF and allows for some context of the scope of the event (i.e. what list element it was, and what type of list it is) please share. I'm a front-end JS guy, and my knowledge of SP is pretty weak. I feel like there's got to be a really easy solution to this problem that I'm missing due to a lack of SP familiarity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.