Hoping you all can help me with this one, trying t...
# suiteanalytics
r
Hoping you all can help me with this one, trying to put HTML formatting into an inline field via a workflow: https://netsuiteprofessionals.slack.com/archives/C298P0BCK/p1756409471736419
a
where are you setting this
'<div style="background-color:red; color:white;">' || 'CUSTOMER IS COD' || '</div>'
value? can you show that in a screenshot. What I suspect is happening is its not using the formula syntax where
||
concatenates but is rather using a Javascript syntax where
||
equates to OR, which returns the first value to the left of the
||
because that string of text will test as true
are you setting the "CUSTOMER IS COD" thing dynamically to different things?
if you just need the hardcoded value you can try just removing the `||`s
<div style="background-color:red; color:white;">CUSTOMER IS COD</div>
(and the single quotes since you shouldn't need them)
r
The workflow is set up to change the inline HTML field after the Terms field is changed. Basically if the terms change to 'Due on Receipt' then the red background HTML should show up. • Custom Transaction Body Field Type: Inline HTML • Workflow set to load before record, state is "On Field Change" for the Terms field =
it won't let me edit but On Field change for Terms = 'Due on Receipt' then this screenshot
If I try your bottom line without the pipes and single quotes, I get stuck loading the sales order. The Items sublist just sits at loading, so my guess is the workflow is hanging.
a
did you enter my suggested fix in the formula field?
because it doesn't need to be, static value should be fine
WF is hanging because the text I suggested isnt a valid formula
r
Yes I tried
<div style="background-color:red; color:white;">CUSTOMER IS COD</div>
and the transaction just hung in the item list loading state.
I tried switching the custom field to a Rich Text and received the same results also. Basically, it seems if I try any format other than the original with the single quotes and pipes, the workflow won't load. I'm beginning to wonder if setting a field in that way via workflow just isn't supported?
a
okay but you didn't answer my question - are you putting that input into the formula section?
image.png
r
It just clicked when you asked it in that way, trying now.
a
is it still richtext field or did you switch it back to HTML?
r
Back to HTML, was about to try Rich Text
would prefer the inline html though
a
yeah i thought that would work in html field šŸ¤”
not sure why this is not working but could another approach work? don't change the value of the field based on your trigger condition, simply default the value and have your trigger display the field instead, so as default field is hidden and WF makes it visible? I'm not an expert on WFs so maybe that's not possible
r
That's a clever approach and worked perfectly!
šŸ™Œ 2
Thanks for your time and help
a
you're welcome šŸ™‚