Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

workflow task in state machine workflow

$
0
0

i have added a new drop down list for task approval

which contain the values

approved and rejected

and i want to approved the workflow task on basis of dropdown value selection for the task

i have tried below but not working

 tid = onTaskChangedInitialSupervisorAction.AfterProperties.TaskItemId;
                    SPListItem task = workflowProperties.Web.Lists["GrvOld Tasks"].GetItemById(RequestApproveTaskItemId);
                    SPListItem currentItem = workflowProperties.Item;

                    //// Ensure the field exists on the item.
                    if (task["WorkflowStatus"] != null)
                    {
                       // Evaluate the value of the field.
                      if (task["WorkflowStatus"].ToString() == "Approved")


this is the column above WorkflowStatus

calling on approval process

also tried as an alternative below with extended properties

   string selVal = onTaskChangedInitialSupervisorAction_AfterProperties.ExtendedProperties["WorkflowStatuss"].ToString();
                  //  int val = 0;

                    if (!String.IsNullOrEmpty(selVal))
                    {
                        if (selVal.ToString()=="Approved")


but not working


it work only if i am checking description

if (this.onTaskChangedInitialSupervisorAction_AfterProperties.
                      Description.Contains("Approved"))


MCTS,ITIL



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>