You have two Custom Data Types (CDT): ACME_invoice and ACME_invoiceItem that have a flat relationship.
The invoice item table has a field that is a foreign key to the invoice table. You are leveraging the database to automatically generate their primary keys.
How should you structure the process model to add a new invoice and the new invoice items to the system?
When dealing with related data types where one has a foreign key to another, you must first create the record in the primary table (ACME_invoice) and then use the generated primary key to create related records in the secondary table (ACME_invoiceItem). This is why you first write to the ACME_invoice table, then update the foreign keys in a Script Task, and finally write to the ACME_invoiceItem table.
Appian Documentation: Relational Databases
Aliza
7 months agoVan
7 months agoVilma
7 months agoSherell
7 months agoReynalda
7 months agoYvonne
8 months agoTerrilyn
8 months agoEdelmira
8 months agoVenita
8 months agoLauna
9 months agoMel
9 months agoSolange
9 months agoMargurite
9 months agoJose
1 year agoPura
1 year agoCasey
12 months agoFrancesco
12 months agoTrinidad
12 months agoClorinda
12 months agoLennie
1 year agoMurray
1 year agoHillary
12 months agoChrista
1 year agoKarma
1 year agoEttie
1 year agoChauncey
1 year agoJanine
1 year agoFausto
1 year agoRoyce
1 year agoLuke
1 year agoFlo
1 year agoLuke
1 year ago