How to pull from system information history to add...
# ask-stanley-ai
h
How to pull from system information history to add a "created by" and "date created" field onto journal entry record?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To add a "created by" and "date created" field onto a journal entry record, you would need to create custom fields and populate them using system note information. Here are the steps you can follow: 1. Create two custom fields on the Journal Entry record. One for "Created By" and another for "Date Created". You can do this by navigating to
Customization > Lists, Records, & Fields > Record Types > Journal Entry > New Field
. 2. Once the fields are created, you will need to write a script to populate these fields. The script should be triggered whenever a new Journal Entry is created. 3. In the script, you can use the
nlapiGetFieldValue('createdby')
and
nlapiGetFieldValue('datecreated')
functions to get the "Created By" and "Date Created" information from the system notes. 4. Then, use the
nlapiSetFieldValue('customfield_createdby', createdBy)
and
nlapiSetFieldValue('customfield_datecreated', dateCreated)
functions to set the values of the custom fields you created. Please note that this solution requires some knowledge of SuiteScript, NetSuite's JavaScript-based API. If you are not comfortable with scripting, you may need to seek assistance from someone who is.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822080314
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818340659
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816121638
Please provide your feedback on this answer.