Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I start worklfow programmaticaly on SPListItem (custom ContentType). When i try to save all fields but "WorkflowInstanceID", its ok. But,

item[SPBuiltInFieldId.WorkflowInstanceID] = "E714297B-E922-410A-9864-959F76A38686"
item.SystemUpdate()

throws Exception:

SqlError: '@tp_WorkflowInstanceID is not a parameter for procedure proc_UpdateListItem.' Source: '.Net SqlClient Data Provider' Number: 8145 State: 1 Class: 16 Procedure: 'proc_UpdateListItem'

share|improve this question

1 Answer 1

up vote 0 down vote accepted

WorkflowInstanceID is only retreivable, it not possible to update this property, as stated in MSDN

This is the unique GUID of the workflow instance, and is what SharePoint uses to identify the instance.

EDIT: And by the way, the title of this question is a bit confusing.

SPBuiltInFieldId.WorkflowInstanceID 

only returns the GUID of the Field that you want to update, hence you are not trying to update SPBuiltInFieldId.WorkflowInstanceID, but the value of that field in an instance.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.