This topic contains 5 replies, has 0 voices, and was last updated by michoel 8 years, 7 months ago.

  • Author
    Posts
  • #2825

    GAJ

    Here is some test code from a PDF template, being used to evaluate a custody checkbox field added to a Sales Order form in the main header area.

    This throws an error when saving the template, saying the custbody field is empty. Can you help with the correct syntax?

    Yes

    No

    #if>

    Very much appreciated.
    This is a cached copy. Click here to see the original post.

  • #2826

    michoel

    Try using the Freemarker default value operator:

    http://freemarker.org/docs/dgui_temp…issing_default

  • #2827

    GAJ

    Thanks for the new reference. Looks useful. In this case though, I can’t set a default. I need to know if the box is checked or not.

    But even before I get to that, I can’t Save the pdf/html file. This throws an error saying line #nnn has an empty value.

  • #2828

    michoel

    If the custom field was created after the Sales Order was saved, the value may be null, not true or false, so it may just work to default to unchecked.

    Also, I’ve come across some inconsistencies in Netsuite/Freemarker where checkboxes are sometimes boolean and sometimes ‘T’ or ‘F’. For example, I have some code that is shared by multiple forms, and I had to do the following for it to work:

    Code:


    GAJ replied on 04/05/2016, 05:54 PM: That is a pretty significant use of your skills. I’ll try that out tomorrow. Thanks for your time on this.

  • #2829

    GAJ

    Michoel, that is a pretty significant use of your skills. I’ll try that out tomorrow. Thank you for your time on this.

  • #2830

    michoel

    Thanks , let me know how you go..

You must be logged in to reply to this topic.