I don't understand the arguments to GetPropertyComplianceFailuresByMasterIds, therefore I figure out how to use it. I'm trying to get property compliance for items and documents. So, it the entityClassId a item's or Document's ClassId & MasterId? Or is the entity a property?
PropCompFail [] GetPropertyComplianceFailuresByMasterIds (
String entityClassId,
Long [] entityMasterIds,
Boolean filterPending
);
Solved! Go to Solution.
Solved by Redmond.D. Go to Solution.
This article should answer your questions: http://justonesandzeros.typepad.com/blog/2010/05/entities.html
Thanks Doug.
I had a had time finding the values for the entityClassId in API help. The only place I can find it in is "What's New". There should be a link to this page on every page entityClassId is referenced.
Doug,
I several UPDs that require a value. The image below shows 3 of these properties that don't comply for one of the files I'm working with. When I execute GetPropertyComplianceFailuresByMasterIds (code is below) on one of the files that don't comply, it returns Nothing. What am I doing wrong?
Dim aMasterFileIds() As Long = {oFile.MasterId} Dim aPropCompFail() As PropCompFail = moPropSrv. _ GetPropertyComplianceFailuresByMasterIds("FILE", aMasterFileIds, False) If Not aPropCompFail Is Nothing Then For Each oPropCompFail As PropCompFail In aPropCompFail Dim aPropertyDefIds() As Long = {oPropCompFail.PropDefId} Dim oPropDefInfo() As PropDefInfo = moPropSrv. _ GetPropertyDefinitionInfosByEntityClassId("FILE", aPropertyDefIds) Dim sPropDisplayName As String = oPropDefInfo(0).PropDef.DispName Dim oPropConstrFail As PropConstrFail = oPropCompFail. _ PropConstrFailArray(0) sPropertiesCompliance = sPropDisplayName & ": " & oPropConstrFail. _ PropConstrFailTyp.ToString & ": " & oPropConstrFail.Val Next End If
It looks like the function is named wrong. It only works if you to pass in the regular file Id, not the MasterId.
I'll log a defect on this.
Thanks Doug, it worked. I thought it odd that it was asking for a master id because each version or a file or Item has its own values of each property.
I pretty sure I'm stating the obvious but please notify the development team so thay can rename it and its entityMasterIds argument. Even though the problem is solved for this application I'm developing, 6 months from now I'll probably forget about this issue.