1
Vote

Display errors if non-default view style is selected

description

If you change view display style lookup column will be shown in <ID#Title> format instead of showing title

comments

EnotPoloskun wrote Jun 25, 2015 at 2:08 PM

It can be fixed this way: replace "JSLink" property in "RichLookupField.cs" with this code:
    public override string JSLink
    {
        get
        {
            if (SPContext.Current != null && (SPContext.Current.FormContext.FormMode == SPControlMode.Edit || SPContext.Current.FormContext.FormMode == SPControlMode.New))
                return string.Empty;
            else
            {
                return JSLinkUrl;
            }             
        }
        set
        {
            base.JSLink = value;
        }
    }