CA Service Management

  • 1.  Banner in SDM

    Posted Apr 17, 2018 12:45 PM

    Before i spend 3 hours looking at it,

     

    Is somedy aware of how to create a banner at the top of detail_chg page?

     

    Something looking like the yellow banner when there is a validation error.

     

    I want it to appear after the Category selection and display the Category description.

     

     

    Thanks guys.



  • 2.  Re: Banner in SDM

    Posted Apr 17, 2018 01:38 PM

    Hi,

    this is not a yellow banner but how it looks in our env:

     

    Code is very simple, on detail form I placed readonly area with ID.

    Category change populate props form (load_property.htmpl) which loads on background workframe.

    We are using same props logic for all interfaces but OOTB employee interface using weird dyn_prop.htmpl and this code could work or not.

    // category have z_ss_hint attr which is string(4000)
    // load_properties.htmpl
    <PDM_IF "$args.category.z_ss_hint" == "">
         if(ahdframe.document.getElementById('ssHint'))
              ahdframe.document.getElementById('ssHint').innerHTML = '';
    <PDM_ELSE>
         if(ahdframe.document.getElementById('ssHint'))
              ahdframe.document.getElementById('ssHint').innerHTML = '<div style="border:1px dashed #EEE;background-color:#F0F0F0;padding:5px 0;">' + '<PDM_FMT KEEPTAGS=YES ESC_STYLE=C>$args.category.z_ss_hint</PDM_FMT>' + '</div>';
    </PDM_IF>
    // detail form:
    detailTextboxReadonly("Hint", "", 1, '', 'ssHint', void(0), void(0), void(0), void(0), "requiredlabeltext", "no");

     

    Regards,

    cdtj



  • 3.  Re: Banner in SDM

    Posted Apr 17, 2018 02:09 PM

    Thanks man.

     

    So i've added "Hello world" as the description of a category.

     

    I've added the first code snippet in load_properties.htmpl, at the end prior to the </pdm_form> tag.

    I've added the detailTextboxReadonly in detail_chg.htmpl.

     

    I'm able to write in the textbox using the chrome console but nothing happens on category change. What am I missing?



  • 4.  Re: Banner in SDM
    Best Answer

    Posted Apr 17, 2018 02:26 PM

    Which interface do you use (empl/analyst)? 

    Try this one:

    - create new ticket, select any category;

    - F12 > Elements > Check workframe, it should contain something like this:

    frameset and frame technology are deprected about 10 years ago, so if you're on 17.x, CA might implemented properties in new way



  • 5.  Re: Banner in SDM

    Posted Apr 17, 2018 03:06 PM

    Analyst.

     

    I do have a frame named workframe. But the body is empty :



  • 6.  Re: Banner in SDM

    Posted Apr 17, 2018 03:25 PM

    yeah, the logic been changed and I have no idea how it implemented.

    as a way you can debug js using Network tab:

    - create ticket, F12 > Network tab, open category popup hier, clear Network tab, select category;

    - after selecting category first row should be related with category;

    - in my situation decided js is change_cat.js with change_category_func:

    but I'm not even sure that properties in sdm17.x still using htmpl form so you can call server variables into it.

     

    There is another way to fetch category's field on the go: SPEL: Dynamic filling of related fields in edit mode where you can simply add dtlReadonly with category.description attr.



  • 7.  Re: Banner in SDM

    Posted Apr 17, 2018 04:11 PM

    Thanks Timur, i'll give it a try.