HTML Portlet: If isinactive ... Hi - I'm trying t...
# suitescript
r
HTML Portlet: If isinactive ... Hi - I'm trying to display a message in an HTML Portlet based on the status of the Inactive field on the Customer record. The code below is correctly pulling the Inactive field status ... var inact indicates 'true' or 'false' correctly based on the entity record. However, the if statement appears to be ignoring the value. I've done this with other fields w/o issue ... any tips would be appreciated! Thanks - var inactiveSearch = search.lookupFields({type:'customer',idparams.entity,columns'isinactive'}); var inact = inactiveSearch.isinactive; if (inact='T') {var Message='This Record Is Inactive'} else {var Message=''};
b
log inactiveSearch to inspect its value
r
@battk Many thanks for the reply. Learning as I go along ... I thought var inact was logging that value as it will output correctly on the screen. Is another step necessary to use it in an evaluation? Any tips would be appreciated!
b
none really, but your questions suggests you dont know how to tell what value is in
inact
and my advice in this case would be to log
inactiveSearch
, the source of its value