How to flow a new field from Purchase Header to G/L Entry during Purchase Order Processing. ?

How to flow a new field from Purchase Header to G/L Entry during Purchase Order Processing. ?

Lets move to the solution directly.

Below is the list of tables where we need to add new field.

1. Table 38 - Purchase Header

2. Table 81 - Gen. Journal Line

3. Table 17 - G/L Entry

Note: It is not necessary to create fields with the same id in above tables. 

Below are the objects and their functions on which code modification is required. 

1. Table 81 - Gen. Journal Line

Function : CopyFromPurchHeader (Assignment of new field from Purchase Header to Gen Jnl Line is required)

2. Table 17 - G/L Entry

Function : CopyFromGenJnlLine (Assignment of new field from Gen Jnl Line to G/L Entry is required)

Code Change suggested after function name is enough to pass a field from Purchase Header to G/L Entry.

If you are using business central than you can subscribe onAfter events of the functions required for code modification. 

 




Comments

Popular posts from this blog

Effortless Data Import Across Multiple Companies in Business Central: A Seamless Approach Using Excel by Vishal Mittal