Clarity Service Management

Expand all | Collapse all

Button new comment in detail_cr_wf.htmpl

Jump to Best Answer
  • 1.  Button new comment in detail_cr_wf.htmpl

    Posted 11-09-2018 04:49 AM

    Hello community, 

     

    In the detail_cr.htmpl form, I have created a new button with the next code:

     

    function zlogcomment()
    {
    popupActivityWithURL(cfgCgi + "?SID="+cfgSID + "+FID=" + fid_generator() + "+FACTORY=" +
    "cr" + "+PERSID=" + argPersistentID + "+OP=UPDATE" + "+HTMPL=detail_alg_edit.htmpl" +
    "+ACTIVITY_LOG_TYPE=LOG");
    }

     

    ImgBtnCreate("z_btn100","Añadir comentario","zlogcomment()",true, 0); 

    The button works ok, no problem.

     

    Now I want to create this button in the detail_cr_wf.htmpl, but it doesn't work. Code used:

     

    function zlogcomment()
    {
    popupActivityWithURL(cfgCgi + "?SID="+cfgSID + "+FID=" + fid_generator() + "+FACTORY=" +
    "crwf" + "+PERSID=" + argPersistentID + "+OP=UPDATE" + "+HTMPL=detail_alg_edit.htmpl" +
    "+ACTIVITY_LOG_TYPE=LOG");
    }

    ImgBtnCreate("z_btn100","Añadir comentario","zlogcomment()",true, 0); 

     

     

    is it possible? How?

     

    Thanks, 

     

    Regards,



  • 2.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 11-09-2018 11:55 AM

    Hi,

     

    Where do you want the activity stored? Do you want it in the request activity log?



  • 3.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 11-12-2018 02:45 AM

    Hi, 

     

    Yes, The button that I have created in the detail_cr.htmpl store in the request activity log. I want a button in the detail_cr_wf.htmpl that store in the request activity log.

     

    Regards.



  • 4.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 11-30-2018 05:15 AM

    Hello, 

     

    any idea?

     

    Best Regards



  • 5.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 11-30-2018 09:15 AM

    try cr_wf...crwf is a wrong object name



  • 6.  Re: Button new comment in detail_cr_wf.htmpl
    Best Answer

    Posted 11-30-2018 11:15 AM

    Hi
    If you want to do the same ( creating an activity log for cr, which worked,when initiated from within the cr detail) from within a cr_wf detail, you need to use the cr persistent_id. argPersistentid will hold the one from the task

     

    popupActivityWithURL(cfgCgi + "?SID="+cfgSID + "+FID=" + fid_generator() + "+FACTORY=" +
    "cr" + "+PERSID=" + "$args.cr" + "+OP=UPDATE" + "+HTMPL=detail_alg_edit.htmpl" +
    "+ACTIVITY_LOG_TYPE=LOG");
    }

     

    I'm not able to test this currently, but give it a try and let us know the results.
    Regards
    .....Michael



  • 7.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 12-03-2018 08:55 AM

    Hi Michael, 

     

    Thank for your response. I have tested and it works ok.

     

    Best Regards.



  • 8.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 12-03-2018 09:08 AM

    Michael, 

     

    I have tested in change order (Detail_wf.htmpl) and doen't work. I have used the code:

     

    popupActivityWithURL(cfgCgi + "?SID="+cfgSID + "+FID=" + fid_generator() + "+FACTORY=" +
    "chg" + "+PERSID=" + "$args.chg" + "+OP=UPDATE" + "+HTMPL=detail_chgalg_edit.htmpl" +
    "+ACTIVITY_LOG_TYPE=LOG");
    }

     

    is it different in change order?

     

    Regards.



  • 9.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 12-03-2018 09:57 AM

    Glad that it works for "cr"

    For detail_wf.htmpl try to use:

    popupActivityWithURL(cfgCgi + "?SID="+cfgSID + "+FID=" + fid_generator() + "+FACTORY=" +
    "chg" + "+PERSID=" + "$args.chg.persistent_id" + "+OP=UPDATE" + "+HTMPL=detail_chgalg_edit.htmpl" +
    "+ACTIVITY_LOG_TYPE=LOG");

     

    again , I did not test

    Regards

    ...............Michael



  • 10.  Re: Button new comment in detail_cr_wf.htmpl

    Posted 12-04-2018 05:44 AM

    Nice Michael, 

     

    All good, works ok.

     

    Thanks you so much, for your fast response.

     

    Best Regards.