This topic contains 5 replies, has 0 voices, and was last updated by pcutler 7 years, 5 months ago.
-
AuthorPosts
-
February 14, 2017 at 3:28 pm #1165
Jarod TavaresLong story short, I’m being given the internal id for a unit of measure (unitstype) from a saved search that’s been provided to me. I need to take that and match it to a base unit and conversion rate. What’s the simplest way to do so?
Code:
search.create({
“type”: “unitstype”,
“columns”: [“internalid”, “name”, “unitname”, “conversionrate”, “baseunit”]
});
…returns everything, units, base units, the works! Great, right? But the given internal id of each unit is not the actual internal id, but rather the internal id of its base unit. Close but no cigar. Also unexpected and misleading.Ok, how about instead searching directly for the internal id I’ve been given?
Code:
search.lookupFields({
“type”: “unitstype”,
“id”: 9,
“columns”: [“name”, “unitname”, “conversionrate”, “baseunit”]
});
…and suddenly…Code:
{
“error”: {
“code”: “UNEXPECTED_ERROR”,
“message”: “An unexpected error has occurred. Error ID: iz63is1y1x58a7tdjff9x”
}
}
Ouch. Guess that’s not supported.Getting units out of NS seems to have been an issue for people in the past, so I was hoping SS 2.0 could provide an answer. The information is obviously partially available to searches, but why not everything? There must be a technical reason that’s not been made clear, right? So far, the only solution I can see is to load the record for every single base unit, pull out all other units as line items to get each internal id, and manually combine the result. Which is a pain, and not something I should have to resort to.
Does anyone see a better way forward? Help, please?
This is a cached copy. Click here to see the original post. -
February 15, 2017 at 11:12 am #1166
starlingMarkHi Jarod,
Have you considered modifying the saved search to provide you the text of the unit of measure? You can then search against that. Another (semi-lousy) alternative would be to lookup the units from the item record.
I feel your pain on this one!
-
February 15, 2017 at 2:38 pm #1167
pcutlerI’ve had the same issue, and I agree with Mark – I haven’t found a good answer.
There are some related enhancements that you could vote for including 74042 and 142605
-
February 15, 2017 at 2:41 pm #1168
Jarod TavaresThanks both.
Originally posted by starlingMark
View Post
Have you considered modifying the saved search to provide you the text of the unit of measure? You can then search against that. Another (semi-lousy) alternative would be to lookup the units from the item record.
I had thought about just using the text, but the fact that the unit name doesn’t have to be unique is a problem.
To make matters worse, the units I’m trying to work with are on line items…
Originally posted by pcutler
View Post
I’ve had the same issue, and I agree with Mark – I haven’t found a good answer. There are some related enhancements that you could vote for including 74042 and 142605
I will look those up!
-
May 30, 2017 at 12:03 pm #1169
cr223309Has anyone been able to solve this issue? I’m currently experiencing the same problems…
-
May 30, 2017 at 11:56 pm #1170
pcutlerI don’t believe NetSuite has made any updates, but another idea that might be worth checking – I wonder if the Internal ID exposed via SuiteTalk is the actual unit of measure’s internal ID:
https://system.netsuite.com/help/hel…l?mode=package
-
AuthorPosts
You must be logged in to reply to this topic.