Looking at Netsuite ARM revenue recognition journa...
# ask-stanley-ai
n
Looking at Netsuite ARM revenue recognition journals which have a Source Revenue Plan on each line, how do I create a SQL that will connect to the source invoice's line?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that the connection between the
RevenuePlan
and the source transaction line is not directly accessible via a single field. However, you can use a combination of fields and methods to establish this connection. The
RevenuePlan
is linked to the
RevenueElement
. The
RevenueElement
is created for each item in a Sales Order (SO). Each
RevenueElement
then causes the actual
RevenuePlan
for posting. The
RevenueElement.source
field holds the document id and
RevenueElement.referenceid
holds the internal id in the format
<RecordType>_<InternalId>
. In SuiteQL, you can use the
SUBSTR
and
INSTR
functions to extract the internal id for a join. Here is an example:
Copy code
sql
SUBSTR(revenueElement.referenceid, INSTR(revenueElement.referenceid, '_') + 1)
This will give you the internal id which you can then use to join with the source invoice's line. ****** 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.840753257
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840608418
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83487767
Please provide your feedback on this answer.