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

  • Esteban Coto Alfaro Profile Picture
    Microsoft Employee 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

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 71 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 43

#3
Syed Aqib Raza Profile Picture

Syed Aqib Raza 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans