I'm annotating a CDT to set it up as a datastore entity. One of t

Certified Senior Developer
I'm annotating a CDT to set it up as a datastore entity.

One of the fields of the CDT is essentially an enumeration. It will contain a text value in the CDT, but in the database this text value maps to a reference table, and the id that matches it needs to go into the table the CDT is linking to (it is a foreign key). While this is simple enough to set up with queries, I'm looking for some advice on how to set up the CDT annotations so that it will work with query rules and write to datastore entities....

OriginalPostID-91831

OriginalPostID-91831

  Discussion posts and replies are publicly visible

Parents
  • Architecturally, you can either map this as a foreign key in your CDT using @onetoone annotation OR you can control the info that gets entered in this field from the front end by populating the field via a drop down that pulls value from the reference table.
    Either way, it is recommended that the drop down value in the UI is pulled from the reference table for consistency.
    Hope this helps.
Reply
  • Architecturally, you can either map this as a foreign key in your CDT using @onetoone annotation OR you can control the info that gets entered in this field from the front end by populating the field via a drop down that pulls value from the reference table.
    Either way, it is recommended that the drop down value in the UI is pulled from the reference table for consistency.
    Hope this helps.
Children
No Data