Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to use Optionset type field in a process as input argument?

(1) ShareShare
ReportReport
Posted on by 12,085 Moderator

Hi all,

I have created a custom workflow in which I defined optionset type input argument. I have use below codes to define it in a custom workflow:

//1.
[RequiredArgument]
[Input("Method")] // what should be presented to the user
public InArgument<int> Method { get; set; } // Declaring a property of type InArgument<Date and Time>

//2
[Input("Method")] // what should be presented to the user
[RequiredArgument]
[AttributeTarget("msdyn_agreementbookingsetup", "aw_method")]
[Default ("920650002")]

//3

[Input("Method")] // what should be presented to the user
[RequiredArgument]
[AttributeTarget("msdyn_agreementbookingsetup", "aw_method")]

When I try to define it in my process as an dynamic value as shown below and save and close:

0160.Untitled1.png

It  showed me an error as shown below:

3884.Untitled2.png

after the above error I open my 'set property' window to see the error. It showed me the static value instead of dynamics one as shown below:

 

6507.Untitled3.png

Is there any way to set dynamic optionset value? or I have to use this static value option ?

Thanks 

Regards,

AW

*This post is locked for comments

  • Suggested answer
    Aditya Profile Picture
    260 on at
    RE: How to use Optionset type field in a process as input argument?

    Please see the link anythingcrm.blogspot.com/.../crm-2011-workflow-activity-parameter.html

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: How to use Optionset type field in a process as input argument?

    Hi all,

    Instead of using dynamically. I used it on the basis on condition wise and now it is working. I think I have to confirm this from you all that the same condition is working for you guys or you are facing the same issue in Dynamics 365 CRM latest version.

    Thanks

    Regards,

    AW

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: How to use Optionset type field in a process as input argument?

    Hi Ravi,

    I already check your suggested one but no luck.

    Thanks

    Regards,

    AW

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: How to use Optionset type field in a process as input argument?

    Not sure why it is happening. I tried a similar sample and it worked for me.

    You setting the value from the same optionset from the same entity or different? Worth verifying.

    Hope this helps.

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: How to use Optionset type field in a process as input argument?

    Hi Ravi

    I have already check this one but no luck.

    Thanks

    Regards,

    AW

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: How to use Optionset type field in a process as input argument?

    Hi Abdul,

    You should be able to set the dynamic value as you have currently configured. Can you check if you have passed the value for all the other required parameters. It is possible that the error is occurring for some other input parameter?

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans