سؤال

I know that in SharePoint Designer workflow it can be checked when attachments are added, but this isn't so super, because when there is some attachment in the list item and someone forgot to add other attachment, then workflow can't check this. So is it possible to check this e.g. via PowerShell?

هل كانت مفيدة؟

المحلول

So, now I use jquery function in new and edit form:

function PreSaveAction()  
{  
    var elm = document.getElementById("idAttachmentsTable");  
    if (elm == null || elm.rows.length == 0)  
        {  
                document.getElementById("idAttachmentsRow").style.display='none';  
        var r=confirm("some text");  
            if (r==false) {  
                return false;  
            }
            else {
                return true;
            }

        }
    else {
        return true;
    }
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top