Hi all,
This code does something very simple, it grabs a list of campaigns.
var filters = new Array(); filters.push(new nlobjSearchFilter('isinactive',null,'is','F')); filters.push(new nlobjSearchFilter('custevent_showleadsource',null,'is','T')); var columns = new Array(); columns.push(new nlobjSearchColumn('title',null,null)); var searchLeadSources = nlapiSearchRecord('campaign',null,filters,columns); This code works perfectly in the debugger, the saved search version of it works perfectly, and all appears fine, until you run it in a suitelet. In the suitelet, I have checked 'Execute as Admin' and 'Available without Login'. What is peculiar is two-fold:1) The if I run the script via in URL (internal), the script works fine2) If I run the script using the URL (external) I get the following error: Code: SSS_INVALID_SRCH_FILTER Details: An nlobjSearchFilter contains invalid search criteria: custevent_showleadsource.
There are no permissions on the Custom CRM Field, and what makes things even more strange is that I have a sandbox and it works perfectly with EXACTLY the same configuration. Same custom field, same deployment/script config, same code. Sometimes you can fix suitelet issues by removing the deployment and the script objects and re-creating them, not this time. Does anyone have any suggestions?