locked
Custom Workflow issue RRS feed

  • Question

  • Hello,

    I have used a custom workflow inwhich i have defined some output parameters of Type Entity Reference,

    I am using it accordingly in the workflow step.

    The issue is: when i am not getting the value of guid or I am not setting the output parameter.It is giving the error - Non empty guid Expected.

    We have such kind of situation where I am not getting the HR but still I Have to include that custom step in our workflow . So I am not able to handle that situation.

    My complete workflows got stuck due to the custom workflow step.

    Please suggest me that how we can handle the Output Parameters in Custom step.

    Thanks

    Thursday, May 17, 2012 10:15 AM

Answers

  • Hi Developer_2011,

    You should be able to set the value as null. For example:

    [Output("Student")]
    [ReferenceTarget("new_student")]
    public OutArgument<EntityReference> Student { get; set; }
    
    // You'll write something like this to pass in null to the Student OutArgument
    Student.Set(executionContext, null);

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 17, 2012 10:24 AM

All replies

  • Hi Developer_2011,

    You should be able to set the value as null. For example:

    [Output("Student")]
    [ReferenceTarget("new_student")]
    public OutArgument<EntityReference> Student { get; set; }
    
    // You'll write something like this to pass in null to the Student OutArgument
    Student.Set(executionContext, null);

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Thursday, May 17, 2012 10:24 AM
  • Thanks a lot,

    It Worked.

    Thanks again

    Thursday, May 17, 2012 11:37 AM