copy header information to lines

I have a requirement where i need to copy header information to lines while creating the lines

I have a site and warehouse fields in header. While i create lines (using catalog items), i need to

copy the header site and warehouse to lines. Also when the header inormaion is edited, the same should

be updated to lines. I need to do this modification in enterprise portal.

I tried to do changes in datasets but iam unable to do this

Can anyone give an idea on how this can be acheived

Thanks in advance


For copying header fields to line fields, there should be a method like initFromYourHeaderTable in your lineTable, you have just to add somthing like this:

YourLineField.YourField = YourHeaderTable.YourHeaderField, each time a record is created in lines, the header value will be copied.

For copying header updates to Line fields, you have the hard way in the following link :, it’s in russian but the code is quite clear, it shows how line fields are automatically updated when header fields are modified. You can do the easy way with adding a modified method() on header form datasource fields, that updates lines corresponding.

hope it helps