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