How to create flow field lookup to different table


I am trying to create new field in Sales Line, which will show value from Sales Header(field Your Reference). I’ve been told to use Flow field with Lookup option.

However I am bit struggling to finish this simple task. Step by Step guide would be appreciated.

What I’ve done so far.

Object Designer → Table Sales Line → Design → New Field. I’ve called this field ‘Your Reference(same as in header table)’

Sales Header ‘Your Reference’ is set to type ‘text’ so I’ve selected same type for Sales Line

Next I’ve selected properties and set Field Class to FlowFilter. What else has to be selected?

I am assuming TableRelation is quite important.

Thank you for your thoughts

You should select the field class as Flowfield …

I’ve already done that, but what is the next step.


Above u said selcted Field calss------> Flow filter

You make it -------> ;you make it Flowfield

and in calc Formula you just do as follows

Method----> lookup

Table—> sales header

Field—> which filed you are referring

In regards to Field—>which filed you are referring

you also have to set which sales header so it finds the sales header that relates to it’s sales lines.

so it’s more than just mapping your new field you need to add Doc type & Doc number relations.

Something like this:

Your New Field->Field->Your New Field
Document Type ->Field->Document Type
No.->Field->Document No.

Now if you want this value to remain once posted - you would either create the same fields again in the

Sales Invoice Header & Sales invoice Line tables or better yet add code OnValidate of the Item No that copies the header value to the sales lines directly without using a lookup. If it’s just a temporary code that is used for sales orders only then a lookup would be fine

Thank you guys, I will try all your advices on Monday. And let you know

Hi everyone, thank you for your advices. I got it working by setting:

  • Data Type = Text
  • FieldClass = FlowField
  • CalcFormula = Lookup(“Sales Header”.“Your Reference” WHERE (Document Type=FIELD(Document Type),No.=FIELD(Document No.)))
  • All other fields are set to default

Thank you once again