AnsweredAssumed Answered

Execute SPL Function from a Button

Question asked by diegolimabsb on Oct 19, 2017
Latest reply on Oct 26, 2017 by diegolimabsb

Hey guys,


Im trying to run a spel code to change the status of all child tickets from detail_cr form.

Following some instructions from the communities I came to the code below to create the file op_custom.cfg:




My spel code is working fine with the .mod trigger, to run thhe spel from a butto i inserted the following code into the request form:


function z_change_status(){ 
var url = cfgCgi +
"?SID=" + cfgSID +
"+FID=" + fid_generator() +
"+OP=z_change_status" +
"+FACTORY=cr" +
"+PERSID=" + argPersistentID +
"+CURRENT_USER=" + "$";
display_new_page(url, ahdframeset.workframe);
<PDM_MACRO name=button Caption="Aprovar filhos" Func="z_change_status()" hotkey_name="Aprovar filhos[A]" ID=APROVE>


All of these customizations were based on the topic SPEL: Register custom webengine OP , but it is very likely that I am doing something wrong.


When I run the button to change the status the SDM logs inform me that:


config_file.c 546 Unable to find the security value for the operation, z_change_status. Default to NONE (0) freeaccess.spl 14675 Unknown webengine operation "z_change_status"


Can anyone help to understand what am i doing wrong?


Many thanks!!!