March 2020
Beginner to intermediate
426 pages
13h 11m
English
Sometimes, we need to associate an event with entity fields using JavaScript code. In those cases, the execution context is automatically passed as the first parameter to the function. For example, let's say we have one field named "amount" and we want to execute a function when the user changes the value of that field. To implement this requirement, we can use the following code:
formContext.getAttribute("him_amount").addOnChange(amountOnChange);
We can use the preceding code to associate the OnChange event with this field. By doing this, the execution context will be automatically passed to our amountOnChange function.
Read now
Unlock full access