Skip to main content
2 of 2
added 18 characters in body
JoannaW_MSFT
  • 6.6k
  • 1
  • 8
  • 10

Per my test, it works in library EditForm.aspx.

Are you using the same list as the source list of the lookup column?

The “Company1” from the code below is the column’s internal name. Ensure the internal name of your column in the document library is “Company1”.

OfficeFieldContext.Templates.Fields = {
            'Company1': {
                'EditForm': Function.createDelegate(officeFieldHandler, officeFieldHandler.render),
                'NewForm': Function.createDelegate(officeFieldHandler, officeFieldHandler.render)
            }
        };

To get the actual internal name for your column, browsing to the library Settings > Edit Column and look at the path.

The path will be like:

<site>/_layouts/15/FldEditEx.aspx?List=%7B<list GUID>%7D&Field=<column internal name>

enter image description here

JoannaW_MSFT
  • 6.6k
  • 1
  • 8
  • 10