AnsweredAssumed Answered

Update Status Using a Custom Button

Question asked by walxarus on Jan 3, 2018
Latest reply on Jan 16, 2018 by walxarus

Hello!, Can I perform an update status action of a change order using a custom button? in fact I need to validate certain conditions and then change the status. the fast way that I see is that the button execute an action macro. is this posible?  maibe using a function like update_status, or I need to create a .htmpl and call using a new url?




var popupURLreintopccce = '$cgi?SID=$SESSION.SID+FID=' +  fid_generator() + 
     '+FACTORY=chg+PERSID=$args.persistent_id+KEEP.argCrearCCCE=1+HTMPL=chg_action_gtt.htmpl' +
<PDM_MACRO name=button Caption="Abrir CCCE" Func="popupActivityWithURL(popupURLreintopccce, 'chg')" hotkey_name="Abrir CCCE" ID=btn_opccce>



on the new ,HTMPL


<PDM_IF "$args.KEEP.argCons" == "1" >
     form_title = "Consulta de Afectacion de Servicios Cambio TTP $args.chg_ref_num";
     <PDM_SET args.ztx_status="PE_OCCCA">     
     <PDM_SET args.zflag_consult="1">     
<PDM_ELIF "$args.KEEP.argCrearCCCA" == "1">
     form_title = "Solicitar Crear CCC Modo Agendamiento Cambio TTP $args.chg_ref_num";
     <PDM_SET args.ztx_status="PE_OCCCA">     
     <PDM_SET args.zflag_opccca="1">
<PDM_ELIF "$args.KEEP.argCrearCCCE" == "1">
     form_title = "Solicitar Crear CCC Modo Ejecucion Cambio TTP $args.chg_ref_num";
     <PDM_SET args.ztx_status="PE_OCCCE">     
     <PDM_SET args.zflag_opccce="1">
<PDM_ELIF "$args.KEEP.argRegIndis" == "1">
     form_title = "Registrar Indisponibilidad Cambio TTP $args.chg_ref_num";
     <PDM_SET args.zflag_indis="1">
<PDM_ELIF "$args.KEEP.argCerrarCCC" == "1">
     form_title = "Solicitar Cerrar CCC Cambio TTP $args.chg_ref_num";
     <PDM_SET args.ztx_status="PE_CLCCC">     
     <PDM_SET args.zflag_clccc="1">