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.