Child Item Attachment
Posted by ksertkaya - Nov 28 ’16 at 12:43
Hello,
I have a child Item. If child item has any attachment, "ChildItemHasAttach" checkbox is checked in parent Item. It is possible?
Thanks.
-
Dmitry KozlovAdminMember for: 8 years 10 months 17 days
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?
-
ksertkayaMemberMember for: 6 years 8 months 21 days
http://prntscr.com/dcolvl
If it has one or more attachment, this checkbox has to checked.
-
YuriyMedvedevModeratorMember for: 5 years 10 months 12 days
Hi! Try this code in Javascript, please:
if ($(".ms-itmhover").find("img[src^='/_layouts/15/images/attach']").length > 0) fd.field("ChildItemHasAttachments").value(true);
-
ksertkayaMemberMember for: 6 years 8 months 21 days
Not work :/
http://prntscr.com/dh69wx
-
YuriyMedvedevModeratorMember for: 5 years 10 months 12 days
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); }
-
ksertkayaMemberMember for: 6 years 8 months 21 days
Thank you