I was trying to follow the instructions in an excellent post "Open workflow initiation form in modal dialog" but did not know how to do this step:
I'm able to dynamically insert the GUID of the workflow as long as I know the name. That way, if I republish the workflow, this custom action will still run correctly."
However, there was no supporting javascript example.
It appears that step is required to make the sample code work when the workflow is republished.
Sample code without the workflow GUID:
javascript:OpenPopUpPageWithTitle(L_Menu_BaseUrl + "/_layouts/IniWrkflIP.aspx?List={11449cc0-e482-4971-9ec7-f12e812f4489}&ID=" + SP.ListOperation.Selection.getSelectedItems(SP.ClientContext.get_current())[0].id + "&TemplateID={c810bee8-8799-40ac-a8db-d564a12c668d}", RefreshOnDialogClose, 600, 400, 'Assign To')
sample URL that gets built (without the workflow GUID):
http://<site url>/_layouts/IniWrkflIP.aspx?List={11449cc0-e482-4971-9ec7-f12e812f4489}&ID=56&TemplateID={c810bee8-8799-40ac-a8db-d564a12c668d}
I don't know what the workflow GUID query parameter is, nor the JSOM to populate it.
Can anyone out there fill in that code gap?
*note: I am posting this as a new question because I apparently do not have permission to comment on that original post.
0 commentaires:
Enregistrer un commentaire