Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

output list in custom workflow?

Posted on by 5

Hi to all!

Project requirements: create a cwa with string input and List output.

But the values that can be used are Bool, DateTime,Decimal,Double,Money,EntityReference,OptionSetValue and string. List no. Suggestions?

  • Emal Profile Picture
    Emal 5 on at
    RE: output list in custom workflow?

    Thank you!

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: output list in custom workflow?

    Hi,

    CWA does not have List data type as output parameter.

    You can create string output and return the list of data as json string which can be parsed by consumer.

    Something like this -

    public class Employee

    {

    public string Name {get;set;},

    public string Email {get;set;}

    }

    List<Employee> employees =new List<Employee>();

    //Add Employee data to List

    //Convert List<Employee> to Json string

    string output=JsonConvert.Serialize<string>(employees);

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: output list in custom workflow?

    Hi Emal,

    Please refer to this blog:

    www.c-sharpcorner.com/.../

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans