I wrote below Java Script and add the functions manually to form load, and product field change event under customer asset entity. The code works, but I see other codes in form libraries works without the need to enter each functions manually through form customization UI, how do I do this?
function onLoad(executionContext){ updateCustomerAssetName(executionContext); } function msdyn_product_onChange(executionContext){ updateCustomerAssetName(executionContext); } function updateCustomerAssetName(executionContext){ var formContext = executionContext.getFormContext(); var product=formContext.getAttribute("msdyn_product").getValue()[0].name; formContext.getAttribute("msdyn_name").setValue(product); }