Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Custom WorkFlow Action wiht field lookup

$
0
0

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.


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>