Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Appian ACD101 Exam - Topic 3 Question 35 Discussion

Posted by Royal on May 02, 2025 at 01:49 PM

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?

Suggested Answer: C

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

Get Premium ACD101 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
32 comments · newest first
AL
Aliza 11 months ago
C is the way to go, ensures the invoice is created first!
VA
Van 11 months ago
I think B is better, updating foreign keys separately makes sense.
VI
Vilma 11 months ago
I agree with Van, B feels more structured and safe.
SH
Sherell 11 months ago
Wait, why would you need a script for foreign keys? Isn't that risky?
RE
Reynalda 12 months ago
Option A seems the simplest for adding both at once.
YV
Yvonne 12 months ago
I’m a bit confused about whether we should use the Multiple Data Store Entities smart service or separate writes. I think I lean towards option A, but I’m not confident.
TE
Terrilyn 1 year ago
I practiced a similar question where we had to manage foreign keys, and I feel like using a script task is crucial for that.
ED
Edelmira 1 year ago
I'm not entirely sure, but I think option C makes sense because it updates the foreign keys after creating the invoice.
VE
Venita 1 year ago
I remember we discussed the importance of writing to the invoice table first to get the primary key before adding items.
LA
Launa 1 year ago
I've got this! The multiple write approach in option A seems the most efficient way to handle this. I'll just make sure to properly link the invoice and invoice items in the process.
ME
Mel 1 year ago
Okay, let's think this through step-by-step. First, I'll write to the ACME_invoice table to create the new invoice. Then, I'll need to update the foreign key in the ACME_invoiceItem table to link the new items to the new invoice. Sounds like option B might be the way to go.
SO
Solange 1 year ago
Hmm, I'm a bit confused about the foreign key relationship and how to properly update it. I'll need to review the details carefully before attempting to solve this.
MA
Margurite 1 year ago
This seems straightforward, I think I can handle it. The key is to understand the relationship between the two custom data types and how the primary keys are generated.
JO
Jose 1 year ago
Wait, we're using Custom Data Types? I thought this was a standard database problem. Now I'm even more confused!
PU
Pura 1 year ago
Haha, this question is a real brain-teaser! I'm going to have to think about this one a bit more.
CA
Casey 1 year ago
↳ replying to Pura
Yeah, Option C seems a bit more complicated with the extra step of updating foreign keys.
FR
Francesco 1 year ago
↳ replying to Pura
I think Option B could work too, with the Script Task to update foreign keys.
TR
Trinidad 1 year ago
↳ replying to Pura
I agree, using the Write to Multiple Data Store Entities smart service seems like the best approach.
CL
Clorinda 1 year ago
↳ replying to Pura
Option A sounds like the most efficient way to handle this process.
LE
Lennie 1 year ago
Option C is interesting, but I'm not sure about the order of the steps. Shouldn't we create the invoice first before adding the items?
MU
Murray 1 year ago
I like option B. Updating the foreign keys separately makes the process more robust and maintainable.
HI
Hillary 1 year ago
↳ replying to Murray
I think option B is the way to go for a smoother process.
CH
Christa 1 year ago
↳ replying to Murray
I agree, separating the foreign key updates can prevent errors in the long run.
KA
Karma 1 year ago
↳ replying to Murray
Option B sounds like a good choice. It helps keep things organized.
ET
Ettie 1 year ago
Option A seems like the most straightforward approach. Why complicate things with extra steps?
CH
Chauncey 1 year ago
↳ replying to Ettie
Yeah, it's important to streamline the process for efficiency.
JA
Janine 1 year ago
↳ replying to Ettie
I agree, keeping it simple with just one smart service makes it easier to manage.
FA
Fausto 1 year ago
↳ replying to Ettie
Option A seems like the most straightforward approach. Why complicate things with extra steps?
RO
Royce 1 year ago
I agree with Luke, option C seems like the most organized approach for adding new invoices and items.
LU
Luke 1 year ago
But option C also updates the foreign keys and separates the writing to each table for clarity.
FL
Flo 2 years ago
I disagree, I believe option B is better because it ensures the foreign keys are updated correctly.
LU
Luke 2 years ago
I think option A is the best choice because it writes to both tables at once.
0/2000 characters

Save Cancel