Can we access item display name field value from item id or item text in advanced pdf template?

Hi I am passing JSON object from scheduled script to advanced pdf template. Can we access “display name” field value from item record from item id or item text?

Please help!

JSON=[{“waveName”:”WV21″},{{“itemId”:100,”item”:”$OffEntireOrder”,”taskQuantity”:1,”taskOrder”:”Sales Order #SO190″,”bin”:””,”taskId”:126},{“itemId”:101,”item”:”Tax Item”,”taskQuantity”:1,”taskOrder”:”Sales Order #SO190″,”bin”:””,”taskId”:127}]}

 

From this JSON I am fetching item id, item text, taskquantiyu and task order in advanced pdf template.

<#if JSON?has_content>
<table style=”width: 100%; margin-top: 10px;border:0.5px solid black;”>
<tr style=”background-color: #E8E8E8;border:0.5px solid black;”>
<td align=”center” colspan=”2″ line-height=”150%” style=”height: 25px;border-left:0.5px solid black;border-right:0.5px solid black;”>Sales Order Number</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>Pick Task#</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>Item Name/Description</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>Quantity</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>Bin</td>
</tr>
<#list JSON.recordLines as record>
<#if record_index != 0>
<tr style=”background-color: ${((item_index % 2)==0)?string(‘#ffffff’, ‘#e3e3e3’)};border:0.5px solid black;”>
<td align=”center” colspan=”2″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>${record.taskOrder}</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>${record.item} </td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>${record.displayname}</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”> ${record.taskQuantity}</td>
<td align=”center” colspan=”3″ line-height=”150%” style=”height: 25px;border-right:0.5px solid black;”>${record.bin}</td>
</tr>
</#if>

</#list>

Beginner Asked on November 9, 2023 in SuiteCloud.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor