Martin
06/03/2025, 3:38 PMCeligo AI
06/03/2025, 3:39 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you're encountering an issue where the
createdFrom
field is not being set correctly when creating a credit memo from an authorization return using Celigo. This issue has been encountered by others as well, and it seems to be a common problem when transforming transactions in NetSuite.
One of the users mentioned that they were able to see the createdFrom
field in the log before saving the record, but it disappeared after saving. This suggests that the issue might be related to how the record is being saved.
Here's a snippet of the code they shared:
javascript
var cmRecord = this.generateCmRecord(cmData)
this.setBodyFieldValue(cmRecord, cmData)
log.debug({
title: 'after set body fields',
details: JSON.stringify(cmRecord),
})
this.clearDiscountItem(cmRecord)
log.debug({
title: 'after discount items',
details: JSON.stringify(cmRecord),
})
this.processItemLines(cmRecord, cmData)
log.debug({
title: 'after item lines',
details: JSON.stringify(cmRecord),
})
this.processApplyLines(cmRecord, cmData.fromInvId, cmData.totalApplyAmt)
log.debug({
title: 'after apply lines',
details: JSON.stringify(cmRecord),
})
log.debug({ title: 'before save', details: JSON.stringify(cmRecord) })
return cmRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true,
})
In this code, they're transforming an invoice to a credit memo, setting some fields, and then saving the record. However, the createdFrom
field is not being set explicitly in this code. It's possible that the createdFrom
field is not being set correctly during the transformation or save process.
Unfortunately, without more information or access to your specific setup, it's hard to provide a definitive solution. You might need to review your transformation and save logic to ensure that the createdFrom
field is being set correctly. If you're still encountering issues, you might need to consult with a NetSuite professional or Celigo expert to help troubleshoot your specific setup.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/03/2025, 3:39 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831488371
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828590095
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818020582
Celigo AI
06/03/2025, 3:39 PMCeligo AI
06/03/2025, 3:42 PM