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,...
Unanswered

Custom WorkFlow Action wiht field lookup

(0) ShareShare
ReportReport
Posted on by 5

I'm doing a simple exercise, the objective is to create an action who receive inputs and then pass them to another entity. For example, i have an entity "Purchase" and there i have the client name, price, etc. I create a button "Pay" and with that i want to pass the ProductName and Price to other entity call it "invoice". The field ProductName is a lookup and its in this field that i don't know what to do.

So in the other field i just do:

[Input("Preco"), RequiredArgument]

public InArgument<decimal> Preco
{
get;
set;

}

and then i do :

Entity invoice = new Entity("train_invoice");


invoice["train_cost"] = Preco.Get(executionContext);

and when i try to do the same for the field who is a lookup : 

[Input("NomeP"), RequiredArgument]

public InArgument<EntityReference> Pessoa
{
get;
set;

}

and i call it this way : 

invoice["train_buyerin"] = Pessoa.Get(executionContext);



and obviously this won't work, can someone help me ?
I don't know how to call a lookup.

I have the same question (0)
  • Esteban Coto Alfaro Profile Picture
    on at

    Hello, here is a sample to create a custom workflow activity, with the prerequisites and requirements: docs.microsoft.com/.../sample-create-custom-workflow-activity.

    And here is an example with code that could be very helpful: github.com/.../SimpleActivities.cs.

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

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