Hi Team, I have a suitelet page with header values...
# suitescript
r
Hi Team, I have a suitelet page with header values and inlineeditor sublist. This suitelet is attached with a CS. On fieldChange of couple of sublist fields I call a popup suitelet window which has its own CS. On the popup CS saveRecord I want to set the selected value onto the parent page sublist field. Tried this
Copy code
window.opener.require(['N/currentRecord'], function(currentRecord) {
    let tranItemline = currentRecord.get();
    tranItemline.setCurrentSublistValue({ sublistId: 'custpage_wo_lines_list', fieldId: attrSetId, value: attrSelectedId, ignoreFieldChange: true });
    tranItemline.setCurrentSublistValue({ sublistId: 'custpage_wo_lines_list', fieldId: attrSetName, value: attrSelectedName, ignoreFieldChange: true });
});
The value gets set on the parent page BUT ONLY when user clicks somewhere on the parent page. How can we make the selected popup value gets set directly onto the parent sublist field (without the extra click) Thanks
Even tried with creating a global function on the parent CS
Copy code
window.updateWOAttributeSelection = function(attrSetId, attrSelectedId, attrSetName, attrSelectedName) { ... }
And called this from the popup CS
Copy code
if (window.opener && typeof window.opener.updateWOAttributeSelection === 'function') {
    window.opener.updateWOAttributeSelection(attrSetId, attrSelectedId, attrSetName, attrSelectedName);
}
Did not help. Please help/suggest. Thanks
Hi all, please help if possible. Thanks