Marc
06/03/2025, 9:41 PMCeligo AI
06/03/2025, 9:41 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you are trying to source a field from a parent record to a child record in the UI. However, the sourcing of the project field from the parent to the child will only happen when the record is saved, not while they are in the UI editing the parent record. To achieve this, you'll need to use a client-side script. This script should be triggered on the fieldChanged event of the parent project field. It should then loop through the child lines to set the project value on each line. Here's a general idea of how the script might look:
javascript
function fieldChanged(context) {
if (context.fieldId === 'custrecordbea_sp_oc_proyecto') {
var record = context.currentRecord;
var lineCount = record.getLineCount({sublistId: 'customrecordbea_sp_orden_de_cambio_det'});
for (var i = 0; i < lineCount; i++) {
record.selectLine({sublistId: 'customrecordbea_sp_orden_de_cambio_det', line: i});
record.setCurrentSublistValue({sublistId: 'customrecordbea_sp_orden_de_cambio_det', fieldId: 'custrecordbea_sp_oc_proyecto_st', value: context.value});
record.commitLine({sublistId: 'customrecordbea_sp_orden_de_cambio_det'});
}
}
}
This script listens for changes to the 'custrecordbea_sp_oc_proyecto' field. When that field changes, it loops through all lines in the 'customrecordbea_sp_orden_de_cambio_det' sublist and sets the 'custrecordbea_sp_oc_proyecto_st' field to the new value of 'custrecordbea_sp_oc_proyecto'.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/03/2025, 9:42 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838334799
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821964622
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820503354
Celigo AI
06/03/2025, 9:42 PM