admin管理员组文章数量:1026989
I am trying to create a message record for a bunch of contacts that are all receiving an email together.
I am using email.send() for the actual email but there is a limitation of only attaching one entity record per email.send().
To work around that I am trying to create a Message record for all the contacts to display all the data under their communication tab.
The issue I'm having is that I am unable to add more than one recipient to the message record.
This is what I am currently trying but I've also tried record.insertLine. I got this error both times. Any advice on where I'm going wrong?
You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist."
var messageRec = record.create ({
type: record.Type.MESSAGE,
isDynamic: true
});
messageRec.setValue({
fieldId: 'subject',
value: 'Test with CC'
});
messageRec.setValue({
fieldId: 'author',
value: 6863
});
messageRec.setValue({
fieldId: 'authoremail',
value: '[email protected]'
});
messageRec.setValue({
fieldId: 'recipient',
value: 9158
});
messageRec.setValue({
fieldId: 'recipientemail',
value: '[email protected]'
});
messageRec.selectNewLine({
sublistId: 'otherrecipientslist',
})
messageRec.setCurrentSublistValue({
sublistId: 'otherrecipientslist',
fieldId: 'email',
value: '[email protected]'
})
messageRec.setCurrentSublistValue({
sublistId: 'otherrecipientslist',
fieldId: 'cc',
value: 'T'
})
messageRecmitLine({
sublistId: 'otherrecipientslist'
})
I am trying to create a message record for a bunch of contacts that are all receiving an email together.
I am using email.send() for the actual email but there is a limitation of only attaching one entity record per email.send().
To work around that I am trying to create a Message record for all the contacts to display all the data under their communication tab.
The issue I'm having is that I am unable to add more than one recipient to the message record.
This is what I am currently trying but I've also tried record.insertLine. I got this error both times. Any advice on where I'm going wrong?
You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist."
var messageRec = record.create ({
type: record.Type.MESSAGE,
isDynamic: true
});
messageRec.setValue({
fieldId: 'subject',
value: 'Test with CC'
});
messageRec.setValue({
fieldId: 'author',
value: 6863
});
messageRec.setValue({
fieldId: 'authoremail',
value: '[email protected]'
});
messageRec.setValue({
fieldId: 'recipient',
value: 9158
});
messageRec.setValue({
fieldId: 'recipientemail',
value: '[email protected]'
});
messageRec.selectNewLine({
sublistId: 'otherrecipientslist',
})
messageRec.setCurrentSublistValue({
sublistId: 'otherrecipientslist',
fieldId: 'email',
value: '[email protected]'
})
messageRec.setCurrentSublistValue({
sublistId: 'otherrecipientslist',
fieldId: 'cc',
value: 'T'
})
messageRecmitLine({
sublistId: 'otherrecipientslist'
})
本文标签:
版权声明:本文标题:netsuite - Trouble setting multiple recipients, cc, or bcc on Message Records using record.create() in Suitescript - Stack Overf 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1737369085a1468610.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论