emailClientOpenPop() UI action

eyal abu hamad
Mega Sage

Hey, I want to add to the bcc users once I press the UI action (email to client)

eyalabuhamad_0-1706021311147.png
I know that Email to client UI action uses the emailClientOpenPop() function.
here is the code.

function emailToClient() {
    //var arr = g_form.getMissingFields();
    //if(arr == ''){

    if (g_form.getValue("assignment_group")) {
        var ga = new GlideAjax('CSManagementUtils'); //e.g. global.softwareUtilsClient
        ga.addParam('sysparm_name', 'updateBeforeEmail'); //e.g. getSoftwareData
        ga.addParam('sysparm_group', g_form.getValue("assignment_group")); //send parameters to function, can be new/old value, g_form.getValue()
        ga.addParam('sysparm_id', g_form.getUniqueValue()); //send parameters to function, can be new/old value, g_form.getValue()
        ga.getXML(ajaxResponse); // set function name
    }
	else{
		g_form.addErrorMessage("You must enter assigment grop before sending email to client");
	}

    function ajaxResponse(serverResponse) {
        var answer = serverResponse.responseXML.documentElement.getAttribute("answer"); //relevant for signal return from script include
        if (answer) {
            emailClientOpenPop('sn_customerservice_case');
        }

    }
    //} else {
    //alert("The following mandatory fields are not filled in : " + arr);
    //}

}

is it possible to auto fill the BCC ? when the pop up window appear using script ?
like if the state something I want to populate a specific someone in the bcc  

eyalabuhamad_1-1706021447093.png

 

 
 

0 REPLIES 0