New Year Sale 2026! 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

Actual exam question for Appian's ACD101 exam
Question #: 35
Topic #: 3
[All ACD101 Questions]

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?

Show Suggested Answer Hide Answer
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

Contribute your Thoughts:

0/2000 characters
Aliza
2 months ago
C is the way to go, ensures the invoice is created first!
upvoted 0 times
...
Van
2 months ago
I think B is better, updating foreign keys separately makes sense.
upvoted 0 times
...
Vilma
3 months ago
I agree with Van, B feels more structured and safe.
upvoted 0 times
...
Sherell
3 months ago
Wait, why would you need a script for foreign keys? Isn't that risky?
upvoted 0 times
...
Reynalda
3 months ago
Option A seems the simplest for adding both at once.
upvoted 0 times
...
Yvonne
3 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.
upvoted 0 times
...
Terrilyn
4 months 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.
upvoted 0 times
...
Edelmira
4 months ago
I'm not entirely sure, but I think option C makes sense because it updates the foreign keys after creating the invoice.
upvoted 0 times
...
Venita
4 months ago
I remember we discussed the importance of writing to the invoice table first to get the primary key before adding items.
upvoted 0 times
...
Launa
4 months 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.
upvoted 0 times
...
Mel
4 months 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.
upvoted 0 times
...
Solange
5 months 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.
upvoted 0 times
...
Margurite
5 months 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.
upvoted 0 times
...
Jose
8 months ago
Wait, we're using Custom Data Types? I thought this was a standard database problem. Now I'm even more confused!
upvoted 0 times
...
Pura
8 months ago
Haha, this question is a real brain-teaser! I'm going to have to think about this one a bit more.
upvoted 0 times
Casey
7 months ago
Yeah, Option C seems a bit more complicated with the extra step of updating foreign keys.
upvoted 0 times
...
Francesco
7 months ago
I think Option B could work too, with the Script Task to update foreign keys.
upvoted 0 times
...
Trinidad
8 months ago
I agree, using the Write to Multiple Data Store Entities smart service seems like the best approach.
upvoted 0 times
...
Clorinda
8 months ago
Option A sounds like the most efficient way to handle this process.
upvoted 0 times
...
...
Lennie
9 months 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?
upvoted 0 times
...
Murray
9 months ago
I like option B. Updating the foreign keys separately makes the process more robust and maintainable.
upvoted 0 times
Hillary
8 months ago
I think option B is the way to go for a smoother process.
upvoted 0 times
...
Christa
8 months ago
I agree, separating the foreign key updates can prevent errors in the long run.
upvoted 0 times
...
Karma
8 months ago
Option B sounds like a good choice. It helps keep things organized.
upvoted 0 times
...
...
Ettie
9 months ago
Option A seems like the most straightforward approach. Why complicate things with extra steps?
upvoted 0 times
Chauncey
8 months ago
Yeah, it's important to streamline the process for efficiency.
upvoted 0 times
...
Janine
8 months ago
I agree, keeping it simple with just one smart service makes it easier to manage.
upvoted 0 times
...
Fausto
9 months ago
Option A seems like the most straightforward approach. Why complicate things with extra steps?
upvoted 0 times
...
...
Royce
9 months ago
I agree with Luke, option C seems like the most organized approach for adding new invoices and items.
upvoted 0 times
...
Luke
9 months ago
But option C also updates the foreign keys and separates the writing to each table for clarity.
upvoted 0 times
...
Flo
10 months ago
I disagree, I believe option B is better because it ensures the foreign keys are updated correctly.
upvoted 0 times
...
Luke
10 months ago
I think option A is the best choice because it writes to both tables at once.
upvoted 0 times
...

Save Cancel