Does anyone know a way with SuiteQL to get child r...
# suiteql
j
Does anyone know a way with SuiteQL to get child records of a parent record (both custom) in the right ORDER (i.e. the order that they appear when in edit mode on the parent record in the UI)?
c
I'd look at what it's ordering by in the UI and just order by that in the SQL
j
I need it to be in the order it appears in edit mode, which is not by clicking a column header, it’s the line id order, but that’s not exposed to SuiteQL.
as far as I can tell
c
internal ID isn't gonna work there?
When I tested this, edit mode has them in the order I created them in which should be increasing internal IDs (should).
j
it’s possible the internal ids could become unreliable if people change the parent record on a child
or if you insert higher in the order
after saving the parent and reopening in edit mode
c
Well if you want to do the line sequence # and its not exposed, you may have to add it as a custom field and populate it and then order by that custom field. I haven't run across it so just thinking out loud
j
yeah this was more of a “is there a secret table I don’t know about” question.