This topic contains 5 replies, has 0 voices, and was last updated by dominicb 8 years ago.
-
AuthorPosts
-
November 2, 2016 at 3:35 am #5996
dominicbCan anyone advise the current situation with searching for a list of web site categories using Suitescript? I understand that this was functionality missing in earlier releases, but I find Netsuite’s documentation of new features a bit hard to fathom and am unsure whether this is something which is now possible. All I’m after at the moment is a list of Website:CategoryId attributes.
I’m currently using SiteCategorySearch() in the PHP toolkit with Suitetalk, but speed is proving an issue.
This is a cached copy. Click here to see the original post. -
November 2, 2016 at 5:42 am #5997
robert.paulsonHi,
Be warned that the following is not documented and most probably not officially supported. Hence this can stop working at any point and time.
It is possible to run a search using the id ‘sitecategory’.
i.e
var columns = [new nlobjSearchColumn(‘name’)]
var results= nlapiSearchRecord(‘sitecategory’,null,null,columns );
Hope that helps
Bob
-
November 2, 2016 at 7:33 am #5998
dominicbThanks Bob. Do you know if it’s possible to filter the results with the website value? Or am I going to have to search category internalIds separately to get the site name/ID they belong to?
-
November 2, 2016 at 10:11 am #5999
fourthwaveconsultingMany of the fields on the category record aren’t available in a search, scripted or not. Most of the time, if you can’t add the field in the criteria or results when creating a search in the UI, then you can’t do it in SuiteScript either. I have written a number of scripts dealing with categories, and I pretty much have to load the category record to get most of the useful information.
-
November 2, 2016 at 8:52 pm #6000
chanarbonFor this concern, what fields from the sitecategory would you like to search? Have you tried to get the similar fields that are available on SiteCategorySearchBasic? You just need to lowercase the ids.
-
November 3, 2016 at 1:56 am #6001
dominicbAll sorted now. In the end, I had to pull the category list, loop through the results, discard the records which didn’t match my criteria, then use nlapiLoadRecord to get the missing website field. Just annoying that I’ve had to do things that way, as it increases script execution time tenfold.
-
AuthorPosts
You must be logged in to reply to this topic.