web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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,119 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

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Ravi

    I have already check this one but no luck.

    Thanks

    Regards,

    AW

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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,119 Moderator on at

    Hi Ravi,

    I already check your suggested one but no luck.

    Thanks

    Regards,

    AW

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    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
    Aditya Profile Picture
    260 on at

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans