How to resolve, conflict between a client side UI action and an onchange client script

Rain Vaine
Kilo Sage

Hello experts,
I am currently stuck on what to do. We are tasked to make a certain field populated after clicking a UI action. But that field is also populated by an onChange client script. 
For better context:
We have an onchange client script on caller field which when changes, the value for the custom field (Email caller name) is set:

RainVaine_0-1709533628799.png

RainVaine_1-1709533642334.png

RainVaine_2-1709533689923.png


But then we were tasked to change (Email caller name) to another value if it was edited manually to an email format and that if the caller field is blank, it is populated via UI action:

RainVaine_3-1709534206969.pngRainVaine_4-1709534255558.png

But if the caller id field is populated by the UI action, the (Email caller name) name field that is populated by the UI action is overridden by the onChange client script.
How can I resolve this conflict.
Regards
Vaine

1 ACCEPTED SOLUTION

Mark Manders
Mega Patron

How can this be an issue? If the caller is empty and the email address is added, it will find the caller that belongs to that email address. So that should be the same, right? Of course, your onchange client script will be called if the caller changes (that's what it should do), but the data shown in the email field should not change, otherwise the data isn't correct.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

1 REPLY 1

Mark Manders
Mega Patron

How can this be an issue? If the caller is empty and the email address is added, it will find the caller that belongs to that email address. So that should be the same, right? Of course, your onchange client script will be called if the caller changes (that's what it should do), but the data shown in the email field should not change, otherwise the data isn't correct.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark