Send SMS UI action doesn't work on Agent workspace, works fine on native UI

Harshil3
Tera Expert

Hi Experts,

I have configured notify with Twilio and want to use the OOB 'Send SMS' UI action/related link added by Notify for sending SMS.

This UI action works fine on Native UI but doesn't work on Agent workspace.

I have tried to add the script to ' workspace client script' instead of Script section of UI action.

Also I have tried to remove the $j.parseJSON and stringify but still the UI action doesn't work on workspace..

any suggestions on what can be done to make it work?

This is the OOB Script which UI action has in script section

function openPopUpSMS(){
	var notifyOnTask = new NotifyOnTaskClient(g_form.getTableName(), g_form.getUniqueValue());
		notifyOnTask.setNumber(g_form.getValue("number"));
		notifyOnTask.setSubmitCallback(smsOnSubmitCallback);
		notifyOnTask.setSuccessCallback(smsOnSuccessCallback);
		notifyOnTask.setCancelCallback(smsCancelCallback);
		notifyOnTask.setErrorCallback(function(){});
		var smsData = NotifyOnTaskClient.getNotifyActionTemplate();
		smsData.addToWorkNotes = true;
		smsData.table = g_form.getTableName();
		smsData.sysId = g_form.getUniqueValue();
		notifyOnTask.openSmsDialog(smsData);
}

function smsOnSuccessCallback(notifyParameters, formObj, formParameters, data){
	g_form.clearMessages();
	var obj = null;
	if(typeof data == 'string')
		obj =$j.parseJSON(data);
	else if(typeof data == 'object')
		obj = data;
	for(var i=0; obj.successMessages.length > i; i++){
		g_form.addInfoMessage(obj.successMessages[i]);
	}
	for(var j=0; obj.errorMessages.length > j; j++){
		g_form.addErrorMessage(obj.errorMessages[j]);
	}
}

function smsOnSubmitCallback(notifyParameters, formObj, formParameters){	
	notifyParameters.dlgWindow.destroy();
}

function smsCancelCallback(notifyParameters){
	notifyParameters.dlgWindow.destroy();
}

 

Thanks in advance.

3 REPLIES 3

Harshil1
Tera Contributor

Did you find a solution to this?

Harshil3
Tera Expert

@prasadpagar Can you please help create this UI Action on Agent Workspace?

Spidyam
Tera Contributor

@Harshil3  are you able to resolve this?