Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Undesired Output value

Posted on by Microsoft Employee

Good Day Everyone!

Sorry for maybe a noob question. I am totally new to CRM and would like to know more about it.

I am trying to create a simple workflow that will return a string value to my output parameter.

I created a button using ribbon workbench that would call a custom action having an input and an output parameter. 

I tested what kind of output my workflow is generating and it is different from what i wanted.

Here is my workflow

custom-workflow-code.JPG

I am getting an output that looks like this (output is inside an alert)

crm-output.JPG

I only want to get the "Test String" as my output value.

Thanks for the help!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Undesired Output value

    Thanks for this one. I somehow got a general idea on how to implement what i want to do on custom workflow :)

  • Verified answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Undesired Output value

    Hi David,

    You could set this output argument to any field of the record to know the value of this record.

    //this is the name of the parameter that will be returned back to the workflow
    [Output("Credit Score")]
    //this line identifies the specific attribute which will be passed back to the workflow
    [AttributeTarget(CustomEntity, "new_creditscore")]
    //this line declares the output parameter and declares the proper data type of the parameter being passed back.
    public OutArgument<int> CreditScore {get;set;}

    See the links below.

    https://community.dynamics.com/crm/f/117/t/163300

    http://anythingcrm.blogspot.in/2013/07/crm-2011-workflow-activity-parameter.html

    http://harishgola.blogspot.in/2012/08/how-to-create-workflow-activity-and-use.html

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Undesired Output value

    actually that's all my code. i just want to get a string output from my custom workflow and have it outputted as an alert. I am in the process of learning how things are working

  • Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Undesired Output value

    Hi David,

    Where are you using the output parameters? Can you post your entire code?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans