Richard Banks
Richard Banks

Reputation: 2983

Workflow column not available when provisioning view against list

Recently I created a web template and as part of the provisioning process i create various pages and assign a workflow to a list. I have a listviewwebpart that points to the list that i have attached the workflow to. I want to show the workflow column in this view but the workflow column is not added to the list until a workflow has been initiated.

Is there a way that you can attach a column to the list and then update the workflow to use that column so that it's available to add to my view when it is provisioned?

Upvotes: 1

Views: 479

Answers (1)

Luis
Luis

Reputation: 6001

I found the only way to workaround this problem is during provisioning I have some code that creates an item in the list, starts the workflow and delete everything after that. Thge column will be available after that as expected.

I know it's hacky, but it worked for me. I am curious to check if someone knows a better way.

Upvotes: 0

Related Questions