Page 1 of 3
Related Items Task field
Posted: 15 Jul 2014
by bnunweiler
I've been trying to set the Related Items field attribute "target" in SharePoint Tasks to, "_blank", so that the item opens in a new tab. I can set it in the IE DOM explorer, but I can seem to set it using fd.field or the JQuery $('.relateditemname').attr("target","_blank"); at design time.
Am I missing something simple? Has anyone else had any luck with this?
Thanks
Re: Related Items Task field
Posted: 17 Jul 2014
by Dmitry Kozlov
Hello,
Please, assign 'related-items' to CSS class of your related items control and put the following code into JS-editor:
$('.related-items .ms-vb-title a').attr('target', '_blank').attr('onclick', '');
Re: Related Items Task field
Posted: 10 Nov 2014
by hp
Hi! I am trying to do same. I have added the script but it doesnt change. Could you please elaborate it little more. I think i am missing which css class to assign the field and where. Thanks in advance!
Re: Related Items Task field
Posted: 11 Nov 2014
by Dmitry Kozlov
Hi,
You should assign a CSS class to the related items control you need to modify:
Re: Related Items Task field
Posted: 11 Nov 2014
by hp
Hi Thanks for quick replay. I have added the css class but it's not taking effect. may be class that is being modified is different than ms-link?
Re: Related Items Task field
Posted: 11 Nov 2014
by hp
if this helps. i am trying to modify related items within task
Re: Related Items Task field
Posted: 12 Nov 2014
by Dmitry Kozlov
Hi,
I cannot find mentions of 'ms-link' class in this thread, Please, make sure that you're trying to do the same thing as the topic starter did: to open items from the related items control in a separate window. Make sure that the Render property of the related items is set in Server.
Re: Related Items Task field
Posted: 19 Nov 2014
by hp
Hi,
yes i am talking about same issue. i tried to attach screenshot but it didnt get attached that's why its confuising what i wrote in post. But i understand solution you suggested it doesnt work. one more thing that i noticed was when i open the form in forms designer, click on 'Related item' under Field it's showing ID, internal name but type is showing as 'unknown'. thanks
Re: Related Items Task field
Posted: 20 Nov 2014
by Dmitry Kozlov
Hi,
I'd suggest to upload screenshots to OneDrive or Dropbox, share them publicly, and put the links here. As for the Unknown type, Forms Designer outputs TypeAsString property of SharePoint field. It seems that 'Unknown' is the value of TypeAsString property of the Related Item field.
Re: Related Items Task field
Posted: 02 Dec 2014
by hp