From: Luc Van Dyck on
"Manish" wrote:

> I am using Microsoft Navision ERP. I have created one field in Sales
> Line Header Table and One Field in Sales Line Table. I want whenever a
> value is entered in above Sales Header Field the same should
> automatically gets updated in Sales Line Field of that particular
> Sales Order.

Put this code in the OnValidate-trigger of your new field, in the Sales
Header table:

lrecSalesLine.SETRANGE("Document Type","Document Type");
lrecSalesLine.SETRANGE("Document No.","No.");
lrecSalesLine.MODIFYALL("Your new Sales Line field","Your new Sales Header
field");

with lrecSalesLine being a local record variable which points to table Sales
Line.

Alternatively, you could use a FlowField in the Sales Line table, so the
field value of the header is automatically calculated in the line table. Look
into the C/AL documentation for the term "Flowfield".

Luc Van Dyck
webmaster http://mibuso.com
"Your favourite knowledge base"