Hello Everyone,
I am trying to do the following,
- Load a saved search
- Set its filters
- Save the search record
- Execute it.
But, after I save my search record it is getting saved as a private saved search and
hence I am getting the following error 'That search or mass update does not exist'.
Note: I have used the setIsPublic(true) method to make the search public while saving it.
Following is my code snipet:
var searchRecordData = nlapiLoadSearch(recType, dataSSID);
searchRecordData.setFilters([
new nlobjSearchFilter(columnId, null, 'IS', id)
]);
searchRecordData.setIsPublic(true);
searchRecordData.saveSearch();
var resultSet = searchRecordData.runSearch();
Script version: suitescript 1.0
it is a '.ss' file being run with elevated permissions.
Thanks in advance!