im trying to create a credit memo form an authoriz...
# ask-stanley-ai
m
im trying to create a credit memo form an authorization return using celigo, but the createdfrom it's not setting up the value even tho it's the correct value
c
AI 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:
Copy code
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. ******
Slack 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
Please provide your feedback on this answer.
Thank you for your feedback