I need to get the lastmodifieddate from a Revenue ...
# ask-stanley-ai
a
I need to get the lastmodifieddate from a Revenue Recognition Rule record, but the revenuerecognitionrule record type is not a valid record type for the Record.load() API, so I tried loading the record's XML page, and the lastmodifieddate node is easily selected from there. However, when I try to request a NetSuite page from within a scheduled suitescript, it returns the NetSuite login page instead of the one I requested. Perhaps I need to authenticate my request. How do I do that?
c
AI generated answer (using internal Slack threads):
It seems like you're trying to access the
lastmodifieddate
from a Revenue Recognition Rule record using SuiteScript, but you're encountering issues because the
revenuerecognitionrule
record type is not a valid record type for the
Record.load()
API. One of the suggestions from the conversations is to use the N/https module to navigate to the URL for the specific record you need to check fields for. You can use the GET method of the https module to read the response back as XML and then use the N/xml module to parse the XML for the fields. However, this approach seems to be returning the NetSuite login page instead of the requested page when executed from a scheduled SuiteScript. Unfortunately, the conversations do not provide a direct solution to this issue. It's possible that the
revenuerecognitionrule
record type is not officially scriptable, as suggested in the second conversation. If it's not in the records browser and doesn't return anything when you use
nlapiGetRecordType()
, it's likely not scriptable. The third conversation mentions working with revenue elements, but it doesn't provide a method for loading and editing them. It suggests that manipulating revenue elements directly might not be the best approach, as it could involve redesigning the ARM module. ****** 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.818603516
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81842041
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817443907
Please provide your feedback on this answer.