It also doesn’t help that now that we’ll be going outside SharePoint more, some of this seems like it’ll require more complexity. For example, authentication will require more than just referencing the logged in user.
Those open up a modal window that passes along approve or reject, along with any comments (comments I’m pretty sure won’t even be possible, but that’s a future problem). Where it’s passed to? A click function associated with the modal’s submit button and initialized on “document ready.”
That click grabs the current list ID and item ID from the URL (using another function for parsing). And then passes all 4 items into the main “updateTaskItem” method.
updateTaskItem first sets up a SP ClientContext. Then grabs the relevant task list, current user, etc. Then queries (executeQueryAsync) the task list (CAMLQuery) for anything matching the current user, “Not Started” status, etc. And finally executes another [...]queryAsync to update the task. And finally call one of two separate functions depending on whether is succeeded or failed.
I assume the old consultant who’s long gone didn’t make this up from out of nowhere. But I also haven’t seen anything like it in my searches. And now I have to convert it to work with NAC…
Any help, tutorials, libraries, guidance, etc. would be greatly appreciated.
Best answer by JakeHarveyView original