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

Javascript API - OndataUpdated

Accepted answer
57
Views
4
Comments
edited Jun 9, 2020 6:29AM in Agent Desktop 4 comments

Summary

Javascript API - Restriction

Content

 
I refer below Javascript API code. PortReference is contact custom attribute text field. 
 
I want execute below code when there is any change in portreference field (not for other fields).  I have tried to add if condition, but I don't know exact syntax. How to restrict? 
 
function ondataupdated(obj) {
var c = window.external.Contact;
var portreference = c.GetCustomFieldByName("CO$PortReference");
var newPortreference = portreference.toUpperCase();
c.SetCustomFieldByName("CO$PortReference",newPortreference);
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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