Nour
08/25/2025, 10:37 AMCeligo AI
08/25/2025, 10:38 AMAI generated answer (using internal Slack threads):In order to access the parent record from a client script deployed on the inventory detail record, you can use the
window.parent
object. This gives you access to the parent window, which allows you to require the N/currentRecord
module.
Here is a code snippet that demonstrates how to do this:
javascript
window.parent.require(['N/currentRecord'], function (currentRecord) {
const parentRecord = currentRecord.get();
// Now you can access fields from the parent record
const someField = parentRecord.getValue({fieldId: 'your_field_id'});
console.log('Value of the field: ' + someField);
});
Please replace 'your_field_id'
with the actual field id you want to access from the parent record.
******
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
08/25/2025, 10:38 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845397115
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843878865
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835540175
Celigo AI
08/25/2025, 10:38 AM