How do I retrieve a value from a related item field in a custom SharePoint workflow?

I am creating a custom WSS workflow in Visual Studio 2008 and doing a "create task" operation. When creating an issue, I want to be able to reference some of the field values ​​from a list item associated with the workflow and for life. I cannot figure out how to get the values ​​in the fields at this point. I know that you can use:

workflowProperties.Item

      

to access the item itself, but if I want to get the value of a field in that item called "Quantity Requested" how would I do that? I've seen the GetFromattedValue (string) method, but I really don't want a formatted value, an explicit string value is all I want.

0


source to share


1 answer


workflowProperties.Item is just an SPListItem, meaning you can access it using SPListItem ["named_column"]:

SPListItem item = workflowProperties.Item; string amountRequested = item ["Requested amount"];



.b

+1


source







All Articles