I have an item record which has the parent field set. When I look on the web page of this item record, I see its itemid
ITEM NAME/NUMBER
CHILD-ITEMID
Sorry, had to censor the actual itemid.
Also when I use the NetSuite field explorer plugin I also see the same value, which is what I expect, it's correct.
But when I try to get the itemid via the SuiteScript N/search module
require([
'N/search',
], function (search) {
const searchIns = search.create({
type: 'serializedassemblyitem',
filters: ['internalid', 'is', '123123',],
columns: ['itemid',],
});
const results = searchIns.run();
results.each((r) => {
console.log('here');
console.log(r.getValue('itemid'));
});
});
I get:
PARENT-ITEMID : CHILD-ITEMID
If I use the N/record module, it's correct, but I need to use the N/search. Is it possible?

You can use a formula to remove the prefix
or if there is a possibility of the parent name having a colon : then something like the below works. The wrapping
REGEXP_REPLACEcleans the colon and space prefixing the basic name.