Sharepoint Approval Work Catch approve button -
i have created sharepoint approval 2010 workflow in visual studio.
how can catch if user clicked approve or reject button?
private void createtaskwithcontenttype1_methodinvoking(object sender, eventargs e) { createtaskwithcontenttype1_contenttypeid1 = "0x01080100c9c9515de4e24001905074f980f93160003a15057e2af34b67b32e14b94eb70409"; createtaskwithcontenttype1_taskid1 = guid.newguid(); createtaskwithcontenttype1_taskproperties1.assignedto = workflowproperties.web.siteadministrators[0].loginname; createtaskwithcontenttype1_taskproperties1.duedate = datetime.now.adddays(1.0f); createtaskwithcontenttype1_taskproperties1.title = "approval required xx"; createtaskwithcontenttype1_taskproperties1.description = "specify approval result here."; splist tasklist = workflowproperties.tasklist;
}
private void ontaskchanged1_invoked(object sender, externaldataeventargs e) {
//i think here have somehow do: if button approve clicked .... else if reject button clicked }
i found solution
private void ontaskchanged1_invoked(object sender, externaldataeventargs e) { string taskstatus = ontaskchanged1.afterproperties.extendedproperties["taskstatus"].tostring();
extendedproperties["taskstatus"] return approved or rejected
there more properties in extendedproperties, need go debug mode see them.
Comments
Post a Comment