This article explains how to update the lookup field display name in Dynamics 365 with JavaScript. The steps involve adding a JavaScript function that retrieves related record and fields from the related table, and updating the display name accordingly. The function can be added to the on-change and on-load events of the form, and the changes will only be reflected on the record referencing the lookup record. The article also includes examples of the JavaScript code for adding both the product name and number or only the product number as the display name.
https://fredrikengseth.com/change-display-name-on-lookup-fields-in-dynamics-using-javascript/
Sep 20, 2021 — There may be cases where you need to set one lookup field value into another lookup field on the form using JavaScript in Dynamics 365.
Jan 27, 2019 — Entity Name of the lookup which entity the lookup record is belongs to. Here is sample code how to set the lookup value using JavaScript ...
Apr 12, 2022 — To set a lookup field value, you need 3 parameters. Id of the lookup record; name of the lookup record; entity name of the lookup entity.