Type SPListItem in Assembly is not marked as serializable.

"Type 'Microsoft.SharePoint.SPListItem' in Assembly 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' is not marked as serializable."

I was cleaning up my VS SharePoint workflow, and I referenced the workflowProperties.Item outside of any code that the workflow touches. So I referenced in first thing in my workflow. Change it so that it’s declared inside workflow code.

RIGHT

SPListItem item = workflowProperties.Item;

instead of

WRONG

SPListItem item;
public void workflowcode(){
item = workflowProperties.Item
}

Advertisements

One thought on “Type SPListItem in Assembly is not marked as serializable.

  1. Hello There. I found your blog using msn. This is an extremely well written article.
    I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s