1

It is really annoying, the below snippet was working until last week, something happened on the 2018.2 and its throwing me error when i try to save the Advanced PDF Template.

<#if !item.custcolprintonpdf>

The error message on Template is "For "!" right-hand operand: Expected a boolean, but this has evaluated to a hash+string (wrapper: com.netledger.templates.model.StringModel):"

It does not stop there, when i update it to <#if item.custcolprintonpdf != "true"> the template gets saved, and when i try to print the Invoice PDF, it gives me below error.

Left hand operand is a hash+boolean (wrapper:com.netledger.templates.model.BooleanModel).

Hope this is an Bug, anyone has any work around? Thanks in advance

Venki WAR
  • 1,997
  • 4
  • 25
  • 38

1 Answers1

0

Saw this in the NetSuite Professionals Slack Group:

I tried doing <#if item.istaxable> and it gave an error saying it was a hash+string but then did <#if item.istaxable == true> and it worked apparently it doesn't like to use a boolean with a true value to signify truthiness all by itself.

Rusty Shackles
  • 2,802
  • 10
  • 11