Marty Zigman Marty Zigman
Prolecto Labs Accelerator Templates

Loading NetSuite User Preferences for Literal Signature Content

Infrastructure NetSuite

Tags: , , ,

This article is relevant if you are seeking a signature on your outbound NetSuite email messages or you are developing code and and you are having trouble reading the ‘userpreferences’ configuration object.

Background


For the longest time, I have struggled with the signature in my email messages that originated from NetSuite.  Since I use a simple text based email signature, I was not thinking in terms of rich formatting.  I simply cut-and-pasted my text based email signature into NetSuite’s user preferences and it worked — well, for the most part.  I would struggle with the signature format at times when I would use the email messaging tool.  It didn’t occur to me to think in HTML terms.

Recently, I was developing content using our Content Rendering Engine (CRE). I was getting JavaScript issues loading the NetSuite Configuration ‘userpreferences’ object.  It would fail when I would retrieve my signature via SuiteScript because the content had line breaks that were not encoded for JavaScript.  I struggled with this until I was in conversation with one of our other developers.  He naturally asked, “why not use HTML for the signature”.  Of course!

Recently, I wrote an article about how NetSuite will escape HTML for us — we can often forget about what is going on behind the scenes as we are producing SuiteScript based solutions.   In this case, I was blinded by simply being too technical about what is going on.   Yet, this text box gets a bit different treatment than others.

NetSuite’s TextArea Signature is Treated as Literal

NetSUite’s Signature is literal based.  I would have learned this quickly by reviewing NetSuite’s field help which offers to use straight HTML.  But this textarea is treated different than other NetSuite textarea elements.  In this field, when you store HTML, you get back HTML.  In the other article , the left and right braces are encoded.  They are not encoded in this case.  The good news is that the treatment here on this field makes using the signature easy to work with in Advanced PDF templates.  Simply output it as is and you get HTML.

I wouldn’t be surprised if other NetSuite SuiteScript developers end up having some trouble with their code.  I suspect that some users may have basic text style line break in their signature field and referencing this data with straight JavaScript will fail.

Help Fellow SuiteScript Developers

If you are a NetSuite SuiteScript developer and you have interesting things you have learned while working in the platform, please share you thinking.  If you would like to work with our team, let’s have a conversation.

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

2 thoughts on “Loading NetSuite User Preferences for Literal Signature Content

  1. Qisko says:

    Can we fetch other users preferences if we are adming

  2. Marty Zigman says:

    From my understanding, you are not able to get another user’s preferences while in a script from another user.

Leave a Reply

Your email address will not be published. Required fields are marked *