ServiceNow Fluent / ServiceNow SDK - Create related record containing reference field using Record API<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } As per ServiceNow documentation for Fluent API examples, a reference field should always have a sys_id as its value :https://www.servicenow.com/docs/csh?topicname=record-api-now-ts.html&version=latest However, this can be tricky when trying to create a record and then create its related record where you need to populate the sys_id of the parent record in one of the reference fields of the related record. Since none of the examples in the documentation cover this, you can try the below : //Create a record in pa_cubes table Record({ $id: Now. ID ["pa_cubes_record"], table: "pa_cubes", data: { name: "pa_cubes_record", facts_table: "sn_grc_issue", conditions:"stateIN52", sys_domain: "global", frequency: 10, calendar: "standard", ·}, }); //save the sys_id of the above pa_cubes record in a variable const recordsysid = Record() //Create a related record in pa_indicators table Record({ $id: Now.ID ["pa_indicators_record"], table: "pa_indicators", data: { name: "pa_indicators_record", cube: recordsysid, //use the variable to populate the reference field conditions: "stateIN2^EQ", sys_domain: "global", unit: "17b365e2d7329100ba986f14ce6103ad", //this is a sample sys_id, use the required sys_id here precision: 0, scores_format: "KMGTPE", key: false, direction: 1, calendar: "standard", collect_records: false, value_when_nil: 0, frequency: 10, aggregate: 1, type: 1, forecast_method: 0, forecast_periods: 0, display: true, render_continuous_lines: true, }, });