Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

output list in custom workflow?

(0) ShareShare
ReportReport
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,964 Super User 2024 Season 1 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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans