官术网_书友最值得收藏!

Many-to-many relationships in ServiceNow

Many-to-many (M2M) relationships are similar to one-to-many relationships, except that they aren't usually dependent on a foreign key column in a child table. Instead, many-to-many relationships in ServiceNow usually rely on an intermediary table called an M2M table. This table commonly has a PK (Sys ID) of its own for each record, and otherwise primarily consists (other than the default System fields, like Updated and Created by) of two FK columns.

As it happens, we've already seen one example of a many-to-many table: the Lou's Shoes Order table we defined earlier! This table creates a many-to-many relationship between the Customer and Item tables. This structure makes sense, because any one customer might order multiple different items, and any one item might be purchased by multiple different customers.

Luckily, in ServiceNow, there is an easy and pre-defined way to create M2M tables. Follow the following steps, to see how to define a new many-to-many relationship table, and add a related list to display that relationship on both related tables (as opposed to just the parent records).

主站蜘蛛池模板: 准格尔旗| 高雄市| 新营市| 武胜县| 高邮市| 额济纳旗| 莲花县| 宁化县| 建昌县| 西贡区| 图们市| 和林格尔县| 固安县| 涪陵区| 卢湾区| 鲁山县| 峨边| 南靖县| 西畴县| 城步| 那曲县| 偏关县| 两当县| 万全县| 通化市| 镇原县| 泾源县| 苏尼特右旗| 安阳市| 上栗县| 伽师县| 水城县| 云和县| 景东| 瓮安县| 义乌市| 循化| 鄄城县| 徐水县| 定西市| 望城县|