Could we change the incident notes to a rich text box?

sam_yan
Giga Guru

Dear expert,

Is it possible to change the incident notes to a rich text box?

Then we can type texts and paste screenshots in one box.

Thank you!

1 ACCEPTED SOLUTION

LaurentChicoine
Tera Guru

Hi Sam,



The previous proposition would probably not achieve what you want because the additional comments need to be kept a journal field input.



The cleaner way to do it is to add a new custom field that would replace the existing additional comments field and to use that field to fill the additional comments.



  1. Create new field of type HTML (u_notes) on task table
  2. On form layout replace the additional comments field by that new field
  3. Create the following business rule

Name: Populate additional comments from HTML


Table: Task


Advanced: True


When: before


Order: 100


Insert: true


Update: true


Filter conditions: Notes changes


Script:


(function executeRule(current, previous /*null when async*/) {



      current.comments = '[code]' + current.getValue('u_notes') + '[/code]';


      current.u_notes = '';



})(current, previous);




However, this will not work with the Post button of the UI16.


View solution in original post

9 REPLIES 9

tarleen
Tera Contributor

Hi Sam,



You can achieve this by changing the type of the particular field to "HTML". This will let you insert the images in the field.



For e.g, if you want to attach screenshots for the "additional comments"   or "work notes" field, then


Right click the field name -> configure dictionary -> change the type to "HTML".   The option for "insert/edit image" will be available. You can choose the type as attachment . Browse the image and then click attach.


The image will be added in the additional comments/work notes field.


It isn't a simple field. I would use Laurent's solution.


Thank you all the same.


LaurentChicoine
Tera Guru

Hi Sam,



The previous proposition would probably not achieve what you want because the additional comments need to be kept a journal field input.



The cleaner way to do it is to add a new custom field that would replace the existing additional comments field and to use that field to fill the additional comments.



  1. Create new field of type HTML (u_notes) on task table
  2. On form layout replace the additional comments field by that new field
  3. Create the following business rule

Name: Populate additional comments from HTML


Table: Task


Advanced: True


When: before


Order: 100


Insert: true


Update: true


Filter conditions: Notes changes


Script:


(function executeRule(current, previous /*null when async*/) {



      current.comments = '[code]' + current.getValue('u_notes') + '[/code]';


      current.u_notes = '';



})(current, previous);




However, this will not work with the Post button of the UI16.


Thank you very much for your solution Laurent!