CA Service Management

 View Only
  • 1.  CASM 17.4.3 - setting SET.html_description not shown in field

    Posted 20 days ago

    Hi all,

    via profile-browser/scratchpad html_description should be set to defined value.

    It all seems to work correct:

    console.log("detail_pr.htmpl:     SET.html_description = " + document.main_form.elements["SET.html_description"].value);

    shows the correct value,

    BUT

    <PDM_MACRO name=dtlCKHTMLEditbox hdr="Beschreibung" attr=html_description colspan=4 fmtfunc=formatHtmlDesc readonly="no" rows=10 size="120">

    does not display it.

    Setting   document.main_form.elements["SET.html_description"].value='example-Value' ;   also is not shown in detail_pr.htmpl-Field.

    But setting summary with SET.html_description - summary shows content at once:

    document.main_form.elements["SET.summary"].value = document.main_form.elements["SET.html_description"].value;

    What I have to do that html_description is filled correct and shown in the GUI?

    Setting     document.main_form.elements["SET.html_description"].value='example-Value' ;    seems not to be enough.

    Saving this, error comes up that description is not filled.

    Please advice what els have to be done to prefill html_description.

    Thanks,

    Peter



  • 2.  RE: CASM 17.4.3 - setting SET.html_description not shown in field

    Posted 20 days ago

    I found a workaround solving my problem:

    In my example in function loadActions() I did following:

       SetCKHTMLValue('" + document.main_form.elements["SET.html_description"].value + "','" + "SET.html_description" + "',true);

    After this Editor shows content and can be saved.

    Regards,

    Peter




  • 3.  RE: CASM 17.4.3 - setting SET.html_description not shown in field

    Broadcom Employee
    Posted 19 days ago

    Hi Peter,

    Using SetCKHTMLValue is not the work around, it's the right way to do it. CKEditor does not use our element IDs or names, so we need a helper method to do that. Check detail_form.js for `function SetCKHTMLValue` implementation and what it does, then it will make more sense.

    Something that I did see in your initial question was that you were reading `document.main_form.elements["SET.html_description"].value`, 
    this might give your stale information, depending if the text in the editor was updated or not, I think you need to ask the editor to backfill your element, then you can read it. For more details see CKEditor Docs . Everybody's lives became more complicated, in favor if better user experience.


    I hope this helps.

    Regards,
    Sebastian




  • 4.  RE: CASM 17.4.3 - setting SET.html_description not shown in field

    Posted 19 days ago
    Edited by Peter Schmidt 19 days ago

    Hi Sebastian,

    thanks again ...

    I think I will check my implementation, but as I need it only when scratchpad was filled with text for html_description I wan't need a backfill.

    It's a onetime thing when ticket is created.

    But for further things it's good to think about backfill.

    Regards,

    Peter