Child Item Attachment
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Could you describe the case in more detail? What if there are more than one child item? How the child items are linked to the parent item? Does a user add child items from the parent form or somehow else?
Could you describe the case in more detail? What if there are more than one child item? How the child items are linked to the parent item? Does a user add child items from the parent form or somehow else?
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
Hi! Try this code in Javascript, please:
if ($(".ms-itmhover").find("img[src^='/_layouts/15/images/attach']").length > 0) fd.field("ChildItemHasAttachments").value(true);
if ($(".ms-itmhover").find("img[src^='/_layouts/15/images/attach']").length > 0) fd.field("ChildItemHasAttachments").value(true);
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
Hi! Try to add CSS-class to Related items, for example "related-items" and then change js-code to this:
if ($(".related-items").find("img[src^='/_layouts/15/images/attach']").length > 0) { fd.field("ChildItemHasAttach").value(true); }
if ($(".related-items").find("img[src^='/_layouts/15/images/attach']").length > 0) { fd.field("ChildItemHasAttach").value(true); }
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests