Trying to modify GL lines for cash sale, I need to...
# suitescript
c
Trying to modify GL lines for cash sale, I need to pass the tran ID into a search but the tran ID does not exist at the time the custom GL plugin runs... If I set to asynch then it seems to work.. is that really the right solution?
r
There should be a transaction parameter on the main function, should contain the details of the record being saved.
Copy code
* @param transactionRecord {nlobjRecord}
 * @param standardLines {StandardLines}
 * @param customLines {CustomLines}
 * @param book {AccountingBook}
 */
function customizeGlImpact(
  transactionRecord,
  standardLines,
  customLines,
  book
)
c
@rustyshackles yes, and transactionRecord.id will return 'To be generated' sometimes if you're executing synchronously.