SHARE
TWEET

QWER

a guest Jan 24th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. SEARCH ACTIVITY 1
  3. var filters = []
  4. filters[0] = new nlobjSearchFilter('supervisor', null, 'anyof', '@CURRENT@')
  5.  
  6. var columns = []
  7. columns [0] = new nlobjSearchColumn('entityid')
  8. columns [1] = new nlobjSearchColumn('supervisor')
  9. columns [2]= new nlobjSearchColumn('email')
  10.  
  11. var result = nlapiSearchRecord('employee', null, filters, columns)
  12.  
  13.      
  14.       result.forEach(function(result){
  15.             console.log(result.getId())
  16.             console.log(result.getValue('entityid'))
  17.             console.log(result.getText('supervisor'))
  18.             console.log(result.getValue('email'))
  19.             console.log('----------------------')
  20.       })
  21.      
  22. SEARCH ACTIVITY 2
  23. var filters = []
  24. filters[0] = new nlobjSearchFilter('type', null, 'anyof', 'SalesOrd')
  25. filters[1] = new nlobjSearchFilter('status', null, 'anyof', 'SalesOrd:A')
  26. filters[2] = new nlobjSearchFilter('supervisor', 'salesrep', 'anyof', '@CURRENT@')
  27. filters[3] = new nlobjSearchFilter('mainline', null, 'is', 'T')
  28.  
  29. var columns = []
  30. columns [0] = new nlobjSearchColumn('entity')
  31. columns [1] = new nlobjSearchColumn('email','salesRep')
  32. columns [2]= new nlobjSearchColumn('statusref')
  33. columns [3]= new nlobjSearchColumn('amount')
  34.  
  35. var result = nlapiSearchRecord('salesorder', null, filters, columns)
  36.  
  37.      
  38.       result.forEach(function(result){
  39.             console.log(result.getId())
  40.             console.log(result.getText('entity'))
  41.             console.log(result.getValue('email', 'salesRep'))
  42.             console.log(result.getValue('statusref'))
  43.             console.log(result.getValue('amount'))
  44.  
  45.             console.log('----------------------')
  46.       })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top