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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to pass a EntityCollection to a custom action?

(0) ShareShare
ReportReport
Posted on by 423

Hello,

is it possible to pass a EntityCollection to a custom action logic? This

[RequiredArgument]
[Input("Sales Order")]
[ReferenceTarget("salesorder")]
public InArgument SalesOrders { get; set; }

or that

[RequiredArgument]
[Input("Sales Order")]
[ReferenceTarget("salesorder")]
public InArgument SalesOrders { get; set; }

leads to this error message in the registration process:

2275.2020_2D00_02_2D00_05-10_5F00_13_5F00_01_2D00_Publishing-Error.png

Sending the EntityCollection (as input argument) from the Javascript logic to the CRM process (custom action) works so far. But I need to send that data to be passed to the C# logic (workflow).

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    EntityCollection is not supported in this case. Please check the doc: docs.microsoft.com/.../gg327984(v=crm.8)

    The following types are supported for custom workflow activities: Bool, DateTime, Decimal, Double, EntityReference, Int, Money, OptionSetValue, String.

    Mehdi,

    Please tick as verified if the answer is useful. 

  • bernhards Profile Picture
    423 on at

    Hello Mehdi,

    thanks for your answer. This means I have to send the selected entities from the frontend (JS, REST) one by one as EntityReference and there is no better/performant way?

    Thanks,

    Bernhard

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    you're welcome. you can pass a string wish contains a list of Guids. Something like: "{xxxx,yyyy,zzzz}".

    In the back-end, split the string and get the Ids.

  • bernhards Profile Picture
    423 on at

    Great idea! Thank you very much for your help!

    Best regards,

    Bernhard

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Please close the thread by checking the answer as verified if the response is useful. Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 95 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 75

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans