How do I check whether an object exists based on its WebDAV URL in Anguila while doing some RTF validation?
1 Answer
I don't think there's any way to check if an item exists in the Content Manager from the CME, except for trying to load it and handling the failure. But that would still log an error on the server.
I'd say create a small web service method that takes the WebDAV URL or item URI as an argument and calls IsExistingObject on the Core Service. If you need to check for multiple items at once, you could instead call GetSystemWideList with a RepositoryLocalObjectsFilterData and the ItemIds property set, and check if any of the items are missing from the result. That would perform much better than individual calls.