This topic contains 4 replies, has 0 voices, and was last updated by zackb22 8 years, 1 month ago.

  • Author
    Posts
  • #1937

    jokell

    I am in the process of making my first advanced PDF form, and I’m running into an issue. On a sales order, I’d like to have the part number replaced if a customer part number exists (part of the newest supply chain management module). Right now, my code looks like this:

    HTML Code:
    ${item.custcol_scm_customerpartnumber}${item.item}#if>
    I took the ?has_content part from the default template, but it only ends up displaying the “item.item” field even if the customer part number is valid. I’ve also tried the following:

    HTML Code:
    ${item.custcol_scm_customerpartnumber!’${item.item}’}
    But that yields a blank spot where the part number should be.

    What am I missing? I’m brand new to this Freemarker stuff, so I’m sure it’s something really simple I’m missing.
    This is a cached copy. Click here to see the original post.

  • #1938

    ChrisCorral

    The first snippet of code is correct. My best guess is that you’re not properly referencing the customer part # field id. Does this transaction column (Customer Part Number) field appear on your Sales Order Forms?

    I would try

    ${record.custcol_scm_customerpartnumber}${item.item}

  • #1939

    michoel

    Originally posted by ChrisCorral

    View Post

    I would try

    ${record.custcol_scm_customerpartnumber}${item.item}

    This doesn’t look right – ‘custcol_scm_customerpartnumber’ is a line level field, not a body field.

    jokell – I would suggest testing ${item.custcol_scm_customerpartnumber} without a condition, to make sure it’s coming across correctly on your template. If it is, try .

  • #1940

    jokell

    Turns out the code I had was correct, I just didn’t have the field correctly displayed on the form. I enabled the feature but never added it to the transaction entry form.

    Thanks!

  • #1941

    zackb22

    A nice and easy way to troubleshoot this in the future is to display the field value somewhere on the page. That way you can see what it is returning, this will help you narrow down the cause.

You must be logged in to reply to this topic.