最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

netsuite - Trouble setting multiple recipients, cc, or bcc on Message Records using record.create() in Suitescript - Stack Overf

programmeradmin27浏览0评论

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'
         })

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论