Nour
08/25/2025, 10:39 AMCeligo AI
08/25/2025, 10:39 AMAI generated answer (using internal Slack threads):In SuiteScript 2.0, you can use the
window.parent
or <http://window.top|window.top>
to get the parent window from the inventory detail popup. Once you have the parent window, you can use N/currentRecord
to get the item receipt record.
Here's a general idea of how you can do this:
javascript
var parentWindow = window.parent;
var currentRecordModule = parentWindow.require('N/currentRecord');
var record = currentRecordModule.get();
In this code, window.parent
gives you access to the parent window. require('N/currentRecord')
is used to get the current record module, and currentRecordModule.get()
is used to get the current record.
Please note that this approach might be considered a browser hack, as it relies on accessing the parent window from a popup. Also, this approach might not work if the parent window is from a different domain due to browser's same-origin policy.
******
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:39 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.866558671
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.864766955
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.862825
Celigo AI
08/25/2025, 10:39 AM