locked
CRM 2011: How to set my output parameter value as the owner of the Task in custom workflow designer. RRS feed

  • Question

  • I can't see output parameter when I have selected my custom workflow activity under Local Values (Showing empty).

    I have created a workflow activity that takes a user as input and retrieve the users country administrator,here I have to use that retrieved output parameter to set as my task owner which I am creating when a new record is created (I can retrieve the administrator value but I can't find the output parameter from the workflow designer view,also when I click on notes I am able to see the value)

    please help me how can I achieve it (I have gone through some answers but din't get any clue)

    Thanks & Regards,

    Sunday, September 22, 2013 7:34 AM

Answers

  • Can you post the code of your workflow custom activity?

    However the output parameters are displayed only when you select the right type of output field. For example if your output parameter is a DateTime, it will show up only when you select crm date fields. Because you selected Owner, your output type must be EntityReference (and reference as systemuser)

    [Output("New Owner")]
    [ReferenceTarget("systemuser")]
    public OutArgument<EntityReference> NewOwner { get; set; }


    My blog: www.crmanswers.net

    Sunday, September 22, 2013 9:33 AM
  • Your code looks ok, I don't see any reasons why your output parameter doesn't show up (and you said is visible when you select the notes field, so the output parameter is working)
    As you wrote you are creating the task inside the workflow, try to add an "Assign Record" for the task you created (instead "Created By(Task)" of my screenshot change to use your custom activity)

    It's a workaround but hope it helps. Another thing to try is to restart the asynchronous service (if you are onpremise) specially if you updated your custom activity and changed the OutArgument properties.

    Hope it helps


    My blog: www.crmanswers.net

    Sunday, September 22, 2013 10:55 AM

All replies

  • Can you post the code of your workflow custom activity?

    However the output parameters are displayed only when you select the right type of output field. For example if your output parameter is a DateTime, it will show up only when you select crm date fields. Because you selected Owner, your output type must be EntityReference (and reference as systemuser)

    [Output("New Owner")]
    [ReferenceTarget("systemuser")]
    public OutArgument<EntityReference> NewOwner { get; set; }


    My blog: www.crmanswers.net

    Sunday, September 22, 2013 9:33 AM
  • Your code looks ok, I don't see any reasons why your output parameter doesn't show up (and you said is visible when you select the notes field, so the output parameter is working)
    As you wrote you are creating the task inside the workflow, try to add an "Assign Record" for the task you created (instead "Created By(Task)" of my screenshot change to use your custom activity)

    It's a workaround but hope it helps. Another thing to try is to restart the asynchronous service (if you are onpremise) specially if you updated your custom activity and changed the OutArgument properties.

    Hope it helps


    My blog: www.crmanswers.net

    Sunday, September 22, 2013 10:55 AM