I think a simpler solution will be to rewrite the ...
# suitescript
k
I think a simpler solution will be to rewrite the function to take a record object as an argument and instead of setting the field value just have it return the value instead, then hand it context.newRecord on the PO script and a record.load of the PO on the IR script, then set the value to the correct number and record.save on the IR script