```var tranid = request.getParameter('transaction'...
# suitescript
m
Copy code
var tranid = request.getParameter('transaction');
if(tranid) {
  var type = nlapiLookupField('transaction', tranid, 'type');
  if(type && type === 'SalesOrd') {
     // Your code here
  }
}
j
I managed to solve it with document.getElementById(‘transaction’).value and then nlapiLookupField. A bit kludgey but it worked…
m
Weird, didn't
request.getParameter('transaction')
work? I am using that in a script succesfully