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
5 months agoVan
5 months agoVilma
5 months agoSherell
5 months agoReynalda
5 months agoYvonne
6 months agoTerrilyn
6 months agoEdelmira
6 months agoVenita
6 months agoLauna
7 months agoMel
7 months agoSolange
7 months agoMargurite
7 months agoJose
11 months agoPura
11 months agoCasey
10 months agoFrancesco
10 months agoTrinidad
10 months agoClorinda
10 months agoLennie
11 months agoMurray
11 months agoHillary
10 months agoChrista
10 months agoKarma
11 months agoEttie
11 months agoChauncey
11 months agoJanine
11 months agoFausto
11 months agoRoyce
11 months agoLuke
12 months agoFlo
1 year agoLuke
1 year ago