SuiteQL to get record text internal id from numeri...
# ask-stanley-ai
d
SuiteQL to get record text internal id from numeric id including native records
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can use SuiteQL to get the record text internal id from numeric id including native records. However, it's important to note that this might not be straightforward due to the complexity of the relationship between different record types and their internal ids. Here's a sample SuiteQL query that was shared in the conversation:
Copy code
sql
select * from ScriptRecordType
join ScriptCustomRecordType
on ScriptRecordType.name = ScriptCustomRecordType.name
where ScriptRecordType.skey = upper('account')
This query joins the
ScriptRecordType
and
ScriptCustomRecordType
tables on the
name
column and filters for a specific record type (
account
in this case). The
skey
column in the
ScriptRecordType
table contains the internal id of the record type. However, it's important to note that there might not always be a direct match between the names in the
ScriptRecordType
and
ScriptCustomRecordType
tables. For example, a custom record could be named the same as a standard record, or a standard record could be renamed the same as another record. Also, certain record types like transactions, entities, and items share record types, which can complicate the mapping between numeric ids and internal ids. Another approach mentioned in the conversation is to use the Transient Record Controller, which uses field sourcing to establish a relationship between different tables/lists. However, this approach might not be suitable for all use cases. In addition, if you're working with SuiteScript, you can use the
getText
method to get the text value of a field from a record. Here's a sample code snippet:
Copy code
javascript
var projectTEXT = this.currentRecord.getCurrentSublistText({
    sublistId: sublistID,
    fieldId: this.layout.driverID
});
This code gets the text value of a field from the current sublist of a record. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806030333
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.795532227
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.792572
Please provide your feedback on this answer.