can we add an inlinehtml field to a sublist item l...
# suitescript
a
can we add an inlinehtml field to a sublist item line?
p
If I remember correctly you can add one permanently (via the customization menu) but not inject one via Code. We had a similiar case a few weeks ago where one of our devs had issues adding it programatically
w
In what context do you want it? Is it in a suitelet? Then no. You can however add a textarea.
Copy code
let custpage_queue_sublist = form.addSublist({
  id: 'custpage_queue_sublist',
  label: '20 Most recent exports',
  type: serverWidget.SublistType.STATICLIST
});
custpage_queue_sublist.addField({
  id:'current_percentage',
  type: serverWidget.FieldType.TEXTAREA,
  label: 'Percentage Complete'
});
let percentage = '95.4%';
custpage_queue_sublist.setSublistValue({
  id: 'current_percentage',
  line: 0,
  value: `<style>.progress{overflow:hidden;height:18px;background-color:#cccccc;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);}.progress-bar{float:left;width:0;height:100%;font-size:11px;line-height:18px;color:#fff;text-align:center;background-color:rgb(66,139,202);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease;-moz-transition:width .6s ease;}</style><div class="progress"><div class="progress-bar" style="width:${percentage};">  ${percentage}</div></div></td>`
});
message has been deleted
a
@Watz UserEvent and Client script
@Petter I've added one by UI, but it will not show the field.
p
@Ali Have a look at your form so that it’s displayed
a
@Petter It is displayed
s
inline fields aren't typically displayed, depends what you put in them
a
@Sandii I have added a simple a tag
what can I put in
I've tested other tags as well
no difference
it will not show the field