CA Service Management

  • 1.  Show survey button for Incident and Request

    Posted Feb 09, 2017 03:25 PM

    Hi, plase your help.

     

    Anybody knows how could we create a new button for Incidents and for requests detail form in order to allow user to access related survey and complete it? (Just like Change Orders and Risk Survey).

     

    If this has already been answered, it is possible to show surveys answers like Change Orders and the button View Risk Survey?

     

    Thanks in advance for your help.

     

    Best regards,

    JOHN



  • 2.  Re: Show survey button for Incident and Request

    Posted Feb 09, 2017 05:51 PM

    You can try to:

     Create the button

     ImgBtnCreate("btn003s", "Do Survey", "do_survey()", "defer", 0);

     

    Create javascript function (you will need to change 400002 to your survey id)

     

    function do_survey(){

     var url = cfgCgi +
         "?SID=0+OP=DO_SURVEY+SVY_ID=400002" +
         "+CNT_ID=" + '$args.customer' +
         "+CNTXT_PERSID=" + '$args.persistent_id' +
      "+KEEP.pid=" + '$args.id' +
         "+KEEP.POPUP_NAME=" + '$args.KEEP.POPUP_NAME' +
         "+CALLBACK=null";

     popupActivityWithURL(url);
     }

     

    Did not tried this, but most probably this will work. It is very similar to sending survey link in email message.



  • 3.  Re: Show survey button for Incident and Request

    Posted Feb 10, 2017 05:11 PM

    Thanks Gutis. It works. We were already able to fill out the survey using this button. You can also show selected answers? I check this behaivour in detail_chg.htmpl and the Review Risk Survey Button. It use show_risk_svy with this code:

     

    function show_risk_svy()
    {
    // call to op=is_co to check if the change order is checked out already
    var url = cfgCgi + "?SID=" + cfgSID + "+FID=" + fid_generator() + "+OP=IS_CO+CNT_ID=" +
    ahdtop.cstID + "+DOBID=" + $args.id + "+FAC=chg+RiskSurvey=1";

    SyncAjaxJSCall(url);
    var features="directories=no,ahdmenu=no,location=no,height=650"+
    ",width=800,topsplash=no,resizable=yes,scrollbars=yes";
    var frame_args="MENUBAR=no+GOBUTTON=no"+
    "+WELCOMEBANNER=no";
    var url=cfgCgi+"?SID="+cfgSID+"+FID="+fid_generator()+
    "+FACTORY=risk_svy_tpl+OP=DO_RISK_SURVEY"+
    "+CRID="+$args.id+"+CNT_ID=$cst.id"+
    "+KEEP.IsPopUp=1+MENUBAR=NO";

    if(is_co == false)
    {
    preparePopup(url,"risk_survey",features,"","",frame_args,true);
    }
    else if(is_co == true)
    {
    AlertMsg=""; // reset the AlertMsg

    var lockmsg = document.getElementById("recordlockmsg");
    if ( lockmsg != null )
    {
    lockmsg.style.display = "none";
    }

    showAlertMsg(errmsg, false);
    }
    }

     

    It is possible to make this works simmilar with incidents?

     

    Best Regards.

     

    JOHN



  • 4.  Re: Show survey button for Incident and Request

    Posted Feb 13, 2017 11:31 AM

    HI John,

    risk survey is to evaluate the risk associated to your change,

    Therefore why will you use it for incident?

    Will be extensive customization include schema modificationto have it work for incident but  I/m not sure I get the purpose,

    specially as you can use also normal survey as show by Gutis.

    my 2 cents

    /J 



  • 5.  Re: Show survey button for Incident and Request

    Posted Feb 13, 2017 11:36 AM

    No, i will use Normal Survey but, What i was trying to say is that if it is possible to review the survey as well as the survey review in Change with Risk Survey. With Gutis help i could add the button and user could complete this, but no to review once survey is filled.

    Thanks for your comment.

    Regards,

    JOHN



  • 6.  Re: Show survey button for Incident and Request

    Posted Feb 13, 2017 11:48 AM

    Ok better understand now. 

    Òut of my head I think you can use the same technic but use VIEW_SURVEY instead of DO_SURVEY for your operation and pass the SVY_ID may i recall correctly

    Hope this help.

    /J