<?xml encoding=”UTF-8″>By Sajith Subramanian
If you wish to check if the file links of an item are up-to-date, using the API, then you can make use of the ItemFileLinkState property for that particular Item. So for e.g:
<span>try</span>
{ <br> Item <span>item</span> = connection.WebServiceManager.ItemService.GetLatestItemByItemNumber(<span>"10001"</span>); <br><br> PropDef[] <span>propDefs</span> =<br> connection.WebServiceManager.PropertyService.GetPropertyDefinitionsByEntityClassId(<span>"ITEM"</span>); <br><br> PropDef prop<span>def</span> =<br> propDefs.Where(<span>s</span> => s.SysName == VDF.Vault.Currency.Properties.PropertyDefinitionIds.<br> Server.ItemFileLinkState).First(); <br><br> PropInst <span>prop</span> = <br> connection.WebServiceManager.PropertyService.GetProperties(<span>"ITEM"</span>, <br> <span>new</span> <span>long</span>[] { item.Id }, <span>new</span> <span>long</span>[] { def.Id }).First(); <br><br><span> var</span> <span>value</span> = prop.Val;
}
This would return 3 possible values – 0, 10 and 20, which basically means: 0 – “Out of Date “; 10 – “Current”; 20 – “No links“.

Leave a Reply