TransferField in Purchase Invoice Header

I created a new field in Purchase Header. And all recods in this tabel has this field with some value.

I created the same field in Purchase Invoice Header

In CodeUnit 90 we have:

// Insert invoice header or credit memo header
IF Invoice THEN
IF “Document Type” IN [“Document Type”::Order,“Document Type”::Invoice] THEN BEGIN

But in my Purchase Invoice the field is empty, Why?

it needs to be the same field number, name and data type in both tables for that to work.

When I need to add fields like that I usually create it in the first table, and actually copy it to the other one.