Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
ondataupdated() set customField — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

ondataupdated() set customField

Received Response
edited Jun 13, 2022 4:09AM in General Technical Discussions 1 comment


Currently, if an agent chooses a specific disposition ID in an Incident, it pings an external service to get back the necessary UUID, and then save it to the custom field on the contact. This works fine, but the data is only saved to the custom field when a save is performed on the Incident which is not the desired outcome. Rather the data should be saved to the field as soon as the saveUUID function is called. Any help is appreciated on this.


May 2017

Code Snippet

             <script type="text/javascript"> 

var initialDisp = window.external.Incident.Disposition;
var i = window.external.Incident;
var c = window.external.Contact;
var cemail;
var serviceResponse;
function ondataupdated(obj)
    if (obj == "Incident")
        if (initialDisp != i.Disposition)
			var newDisp = i.Disposition
			dispLevels = (newDisp.split(",").length - 1);
			delimiter = ',';				
			tokens = newDisp.split(delimiter).slice(dispLevels);  
			newDisp = tokens;
			var ccid = newDisp;
			if((newDisp == 4927)||(newDisp == 4928))
				if((c.EmailAddr != "undefined") && (c.EmailAddr != null))
					var cemail= c.EmailAddr;					
					var cemail = c.EmailAddr;

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!