HD structures are created in several ways, such as:

  • Automatically—The system create an HD structure when a user creates a new record in the Header Detail application. You can then enter values into the fields and save the changes.
  • Manually—Use the Create HD Structure action in the Logic Builder. You can use insert actions to add values to the HD Structure. Learn more in the Create HD Structure action topic.  

When a Header record is deleted from a Header Detail application, both the Header record and associated Detail records are deleted. This only occurs if the Header and Detail are part of an HD Structure. 

The HD structure type you select depends on how you're using the HD structure. HD structures can be:

TypeUse to...Configuration Notes
NewInsert a new record to a Header Detail table. Logic blocks treat the structure as a record to be inserted into the database. To prevent unwanted updates from occurring, use a NATE container. If you don't use a NATE container, updates and validations from Header to Details and Details to Header with modified by another user errors may occur.
The same updates in a Temporary HD Structure do not trigger and perform validations.
ExistingUpdate an existing Header Detail record. 
TemporaryCreate a structure that isn't saved automatically. For example, passing a Header Detail record into a called logic block. If you use temporary HD Structure but want to commit them, you must use the Save HD action before you reinsert any new HD structures. 
Validations that exist for New and Existing HD Structures are bypassed which means you do not need to use a NATE container. You cannot commit a temporary structure, so its usage is more limited. 

When a logic block is built over a Header Detail table, the logic block has access to the Header records. Use a Fetch Details action to access and work with the Detail records. When a logic block is not built over a Header Detail table, create an HD structure in the logic block.

For example in the WriteProcurementOrderToSupplierview logic block, the actions in the logic block create a new HD structure, insert a record into a header table, fetch detail records, insert a detail record in the data found loop, and then save a header detail record. The table below is an example of these logic block actions:

ActionAction typeAction Summary
0Create HD StructureCreate new HDStructure
1Insert RecordsInsert a record in ProcurementOrdersSupplierViewHeader
2Fetch Detail RecordsFetch all ProcurementOrderDetail records
3Insert RecordsInsert a record in ProcurementOrdersSupplierViewDetail
4Save HDSave ProcurementOrdersSupplierView

Insert records in to a Header Detail table

Logic blocks can use HD structures to insert records into Header Detail tables. Usually these records come from one or more tables that are not Header Detail tables, such as Main tables. 

For example, the WriteGLTransaction logic block is the action block used to insert records into the GeneralLedgerTransactions table, which is a Header Detail table. When the WriteGLTransaction logic block is called, an HD structure is passed in. The WriteGLTransaction logic block validates the record, and then inserts the Header Detail record into the GeneralLedgerTransactions table.

Integrations

Logic blocks can use HD structure to create records during integrations, and organize data before inserting them into a Header Detail table.

For example, the CreatePayableTransactions logic block is used to insert records into the PayableTransactions table during integrations. The PayableTransactions table is a Header Detail table. 

  1. The CreatePayableTransactions logic block is called by the IntegratePayableTransactions logic block. The IntegratePayableTransactions logic block is built over the PayablesIntegration table, which is a Main table.
  2. The IntegratePayableTransactions logic block passes in records for a specific run number to the CreatePayableTransactions logic block. 
  3. The records are grouped and held in an HD Structure using the Create HD Structure action, and then inserted into the PayableTransactions table.

The IntegratePayableTransactions table is a Main table and the PayableTransactions table is a  Header Detail table,  and using the HD Structure allows you to organize the records before inserting them.

Pass data to a called logic block

Logic blocks can use HD Structure to pass data to another logic block. Usually this is done using the Call a Logic Block action.

For example, the CreateCreditCardIssuerInvoice logic block passes values in to the WritePayableTransaction logic block, which then inserts records into the PayableTransactions table. The PayableTransactions table is a Header Detail table. 

When a supplier invoice is paid using a credit card payment method, an invoice is automatically created to reflect the balance now owed to the credit card company. This steps below describe the logic performed to complete this process.

  1. The CreateCreditCardIssuerInvoice logic block creates a temporary HD Structure to hold and organize values, inserts values into the structure, and then calls the WritePayableTransaction logic block.
  2. When the WritePayableTransaction logic block is called, the HD structure created in the CreateCreditCardIssuerInvoice logic block is passed in.
  3. The WritePayableTransaction saves records to the PayableTransactions table.
  4. The values are validated, and then committed to the PayablesHeader and PayablesDetail tables.