how to create custom transaction with no GL Impact
# ask-stanley-ai
s
how to create custom transaction with no GL Impact
c
AI generated answer (using internal Slack threads):
To create a custom transaction with no GL Impact, you can use a Custom GL Impact plug-in script. This script allows you to customize the GL impact of a transaction by adding, modifying, or deleting GL impact lines. Here is a sample code snippet:
Copy code
javascript
function customizeGlImpact(transactionRecord, standardLines, customLines, book) {
    var recordID = transactionRecord.id;
    nlapiLogExecution('DEBUG', 'recordID ', transactionRecord.id);
}
In this function,
transactionRecord
is the nlobjRecord object representing the NetSuite transaction being processed.
standardLines
is an object representing the standard GL impact lines that NetSuite would normally generate for the transaction.
customLines
is an object representing the custom GL impact lines that you can add, modify, or delete.
book
is an object representing the accounting book in which the transaction is being posted. Please note that the transaction ID (
transactionRecord.id
) will not exist during the "Create" event because the transaction has not been saved yet. If you need to pass the transaction ID into a search, you might need to set the script to execute asynchronously. Also, if you're using custom transactions and want them to post to GL, you need to check the "posting" option on the status tab of your custom transaction setup. Please note that once you have transactions, you may not be able to change this flag. ****** 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.825861096
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811787724
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811585367
Please provide your feedback on this answer.