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 :
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).

I have the same question (0)
  • Verified answer
    meelamri Profile Picture
    13,216 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,216 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,216 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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans