This topic contains 5 replies, has 0 voices, and was last updated by FHC 7 years, 8 months ago.
-
AuthorPosts
-
February 28, 2017 at 3:58 pm #5905
FHCI’ve got a programatic search I’m trying to run using the following as the basis for the code:
Code:
columns = new Array();
columns[0] = new nlobjSearchColumn(‘itemid’);
columns[1] = new nlobjSearchColumn(‘internalid’);
columns[2] = new nlobjSearchColumn(‘urlcomponent’);
columns[3] = new nlobjSearchColumn(‘categorypreferred’);
columns[4] = new nlobjSearchColumn(‘storedisplayname’);
columns[5] = new nlobjSearchColumn(‘displayname’);
columns[6] = new nlobjSearchColumn(‘parent’);
columns[7] = new nlobjSearchColumn(‘matrix’);columns[0].setSort();
filters = [
[“type”,”anyof”,”InvtPart”],
“AND”,
[“isonline”,”is”,”T”],
“AND”,
[“isinactive”,”is”,”F”],
“AND”,
[“website”,”anyof”,”2″]
]results = nlapiSearchRecord(‘inventoryitem’, null, filters, columns);
I need to be able to sort by itemid because I need to group the items together by matrix items. But, the results that are returned in the itemid column via nlapiSearchRecord are not the same ones I get when I just execute the search in Netsuite. When I run the search in Netsuite, I can see an itemid like this:Item Name-Black-S
Item Name-Black-L
(with extra data representing their matrix options.). When I execute the code above, all that comes back is:Item Name
Item Name
What gives? Why are they different?
This is a cached copy. Click here to see the original post. -
February 28, 2017 at 4:03 pm #5906
david.smithTry using this: https://chrome.google.com/webstore/d…epdmfaihdokglp
-
February 28, 2017 at 4:11 pm #5907
FHCAnd even when I create a saved search and edit all the parameters through the saved search, the itemid doesn’t return correctly.
results = nlapiSearchRecord(‘item’, ‘customsearch_searchid, null, null);
-
February 28, 2017 at 4:12 pm #5908
FHCThanks, David. Your plugin is exactly what I used to get my filters and columns setup. In all cases, the itemid doesn’t return the full string.
-
February 28, 2017 at 5:20 pm #5909
david.smithHmmm, I’m not sure. That seems weird.
-
March 13, 2017 at 7:42 pm #5910
FHCI actually ended up figuring out why it was doing this. Under the advisement of one of the fine folks in these forums (@david.smith), I’ve been executing the script as a custom role called “External Scripts Only” which has a bare minimum of user permissions (some access to custom records and items > View under Permissions > Lists). I changed the script to run as Administrator and was able to receive the full itemid. However, I don’t know why there would be a difference between the two or if there are some permissions I could add to my custom user role that would return the full itemid… (Items > Full doesn’t work)
-
AuthorPosts
You must be logged in to reply to this topic.