how to set Inline HTML field value in netsuite via script

var msg = ‘<div style=”font-weight:bold>To view message <a href=”‘+turl+'”>Click here</a></div>’;
nlapiSubmitField(‘SalesOrder’, recId,’custbody_inlinehtml’, msg);

Rookie Asked on March 23, 2021 in SuiteScript.
Add Comment
1 Answer(s)

Inline HMTL fields don’t store value, you cant set them with a field value. For your particluar task, I would recommend making another field to store your url and make the Inline HMTL field’s default value be a formula that references your second field.

You probably want to restructure your message to be more convienient if you have to do another field to store your message if you dont want a link for null urls.

Intermediate Answered on March 23, 2021.

Can you please brief me,  how to achieve the result?

on March 23, 2021.

Your inline html field should be setup as a formula field. Specifically. you should use your html as your default value, and then use a field reference to get the value of another field which stores the url you want to link to. Update that second field with the url instead of trying to set the inline html field.

on March 24, 2021.
Add Comment

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   Limebox   Become a Sponsor