Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having a problem with 'SpecialPermissions' its underlined in red (last line of code)

Error 1 'Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties' does not contain a definition for 'SpecialPermissions' and no extension method 'SpecialPermissions' accepting a first argument of type 'Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties' could be found (are you missing a using directive or an assembly reference?)

using System.Collections.Specialized;

private void FC_RemovePendingTask_MethodInvoking(object sender, EventArgs e)
{
    FC_RemovePendingTask_TaskId1 = Guid.NewGuid();
    FC_RemovePendingTask_TaskProperties1.Title = "Remove Timer";

    FC_RemovePendingTask_TaskProperties1.DueDate = DateTime.Today;

    FC_RemovePendingTask_TaskProperties1.AssignedTo = "S_Financial";



    HybridDictionary permsCollection = new HybridDictionary();

    permsCollection.Add(FC_RemovePendingTask_TaskProperties1.AssignedTo, SPRoleType.Administrator);   

    FC_RemovePendingTask_TaskProperties1.SpecialPermissions = permsCollection;
 }
share|improve this question
    
Raj, no need to use <pre> tag in the code formatting. Using the {} button will format it properly and apply color coding. –  Robert Kaucher Mar 16 at 1:43
add comment

1 Answer 1

It's CreateTask itself that has SpecialPermissions not SPWorkflowTaskProperties so you should set in to the CreateTask activity using the taskproperties

share|improve this answer
    
I've tried setting it in the tasp properties now. Clicking on special permissions a dialog box pops up but there are no members to select from? How can i add members ? Thanks –  Raj Chahal Jun 24 '12 at 8:32
    
As far as I know you can'd do it in the UI. But in your code you just reference createTask1.SpecialPermissions (Where createTask1 is the name of your activity) instead of FC_RemovePendingTask_TaskProperties1.SpecialPermissions –  Per Jakobsen Jun 24 '12 at 8:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.