I am struggling trying to get a custom record item...
# general
p
I am struggling trying to get a custom record item from a sublist show in an email template and could use some guidance on what I am doing wrong. • My Custom Record is linked to the transaction via the tranid and that field id is
custrecord159
. • On that Custom Record I have Allow Child Record Editing checked and Enable Mail Merge Unchecked. • The field I am trying to get to print is
custrecord158
. This field has Show in List and Record Is Parent as unchecked but Store Value is checked. • In my email template I am using the following:
<#list transaction.recmachcustrecord159 as rec>${rec.custrecord158}</#list>
From what I read and from advise given here and elsewhere this should be working but it is not. What am I doing wrong?
b
Screenshot of the sublist on edit of the transaction?
that looks like a parent/child sublist
whats the output of your email template
p
Blank - does not print anything,
This is my custom record setting:
b
what does the source of your email template look like
source button is the first button labeled div
under the message field
p
<br />
<span style="font-family:Arial,Helvetica,sans-serif;">ITN Number -&nbsp;</span><br />
<br />
&nbsp;<#--FM:BEGIN--><#list transaction.recmachcustrecord159 as rec>${rec.custrecord158}></#list><#--FM:END-->&nbsp;<br />
<br />
<br />
<span style="font-family:Arial,Helvetica,sans-serif;">Should you have any questions or require additional information please let me know.<br />
<br />
Thank you and Regards.<br />
<br />
<br />
${preferences.MESSAGE_SIGNATURE}</span>
b
that all looks valid
try loading the record in suitescript and logging it
p
sorry - a little lost on how to load a record and log it.
b
sorry, forgot i wasnt in the suitescript channel
use the NetSuite Field Explorer extension to take a look at the data behind your transaction
the extension should add a button which shows the data on your transaction
there should be a section with your sublist's id in there with a list of your fields
use it to make sure you got your ids correct
p
so in my transaction the sublist does not appear.
b
what sublists are on it?
p
this is what I see:
b
do it on a record that already has records attached
and try to find the sublist that matches yours
you should probably also assign a more usable id to the field you used for the parent/child relationship
p
you rock! I figured out what my issue was. Although the record was showing in the sublist it was not attached (ie. the attach button was not pressed.) I was not aware that after you create the record you still need to attach it to the transaction.
one question though - i notice that fields that are lists are not showing in the the field explorer. are these not accessible?
b
which fields
p
disregard. i did not have the show in list checked off for those fields.