Tag Info

New answers tagged

1

From InfoPath Designer Select File menu tab Select SharePoint List template Select Design Form button Enter Site URL Select existing List Select Content Type The new InfoPath Form is now associated with a specific Content Type. https://kerdirks.wordpress.com/2012/10/03/associate-custom-infopath-form-with-list-content-type/


1

Inside RunWithElevatedPrivileges you should impersonate current user. Something like var userToken = SPContext.Current.Web.AllUsers["domain\\user"].UserToken; using(SPSite site = new SPSite(SiteURL, UserToken)) list.Update(); //Will save the record as the selected user.


1

Another option would be to make the REST call using the Workflow Instance ID [site]/_api/web/Lists/getbytitle('Tasks')/Items?$filter=(WF4InstanceId%20eq%20guid%277f02790a-4244-43c6-8d71-fdd272248cd5%27)


0

As it turns out, it seems like you have to set a variable once the task is created, so you can store the task ID. https://support.office.com/en-us/article/Collect-data-from-a-user-in-a-workflow-a1758bcc-6a93-4ca9-9b55-7821b91e80f4?ui=en-US&rs=en-US&ad=US#ocpArticleContent Go to Step 2: Set a workflow variable. In sharepoint 2013, I went to the ...


0

I prefer other methods to the JavaScript workaround to really solve the problem: 1. You can change the list form assigned to the local Task content type, for example via PowerShell: $web = Get-SPWeb http://YourSharePointSite $list = $web.Lists["Tasks"] $ct = $list.ContentTypes[0] $ct.DisplayFormTemplateName = "ListForm" $ct.NewFormTemplateName = ...


0

There are couple of issue with your script. For example the colorCodes array object has an extra comma. Below is a re-factored version of your code. Add below code inside the Script Editor $(document).ready(function() { ExecuteOrDelayUntilScriptLoaded(ColorCode, "sp.js"); }); function ColorCode() { var colorCodes = { "Flyer / brochure": ...


1

How to approve workflow task item using JSOM The following example demonstrates how to approve task item using JSOM function approveTask(listTitle,itemId, success,error){ var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle(listTitle); var item = list.getItemById(itemId); item.set_item('Completed',true); ...


1

Using JSOM you can update any list item. In particular to approve a task item, you should update following fields taskItem["WorkflowOutcome"] = "Approved"; taskItem["FormData"] = "Completed"; taskItem["Status"] = "Approved"; taskItem["PercentComplete"] = 1; taskItem["Completed"] = true;


0

public SPWorkflowTaskProperties onTaskChanged1_AfterProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties(); public SPWorkflowTaskProperties onTaskChanged1_BeforeProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties(); private void onTaskCreated1_Invoked(object sender, ExternalDataEventArgs e) { int id = ...



Top 50 recent answers are included