Hello,
I'm attempting to set a lookup field on a form with a text field value on the same form using JS. My scenario is that I'm writing a related record's GUID to a text field on my main form, and the trying to set a lookup field using the GUID value from the text field. I've attempted to build out the JS using a lookup array, but I receive an onload alert stating 'Entity Type not defined'. Reason being is my formContext.getAttribute is a text field and not a lookup field. If I change out the getAttribute to a lookup it works fine b/c I'm defining the id/name/entity type. Is there any way to do this?? I keep spinning in circles. Also, I'm currently using on-premise so I can't use Flow, this has to be done using .JS
Any advice would be greatly appreciated!! Thanks