How do I find Metadata for a publication through its GUID using the API?
I have the GUID, but I am not able to get Metadata for it. I am able to get it for Maps.
I used (Maybe I am using the wrong function. If so, what is the right one?):
var ext = new Trisoft.InfoShare.API25.DocumentObj();
string requestedMetadata = "<ishfields>" +
"<ishfield name='VERSION' level='version'/>" +
"<ishfield name='FTITLE' level='logical'/>" +
"<ishfield name='FSTATUS' level='lng'/>" +
"</ishfields>";
var version = mapVersion; // it is 2 in this case
var guid = "GUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
var objectList = ext.GetMetadata(guid, ref version, "en", "", requestedMetadata);
Error I get:
Trisoft.InfoShare.Business.ObjectNotFoundException: The object GUID-11111111-2222-3333-4444-555555555555=2=en= does not exist. [co:"GUID-11111111-2222-3333-4444-555555555555=2=en="]
at Trisoft.InfoShare.Business.DocumentObject.GetComponentObject(String logicalId, CardTypes cardTypes, IshVersion& ishVersion, IshLovValue language, IshLovValue resolution, Boolean writable, Boolean throwIfNotFound, ComponentInformationSet& informationSet)
at Trisoft.InfoShare.Business.DocumentObject.GetMetadata(String logicalId, IshVersion& ishVersion, IshLovValue language, IshLovValue resolution, IshRequestedFields ishFieldsRequestedMetadata)
at Trisoft.InfoShare.API25.DocumentObj.GetMetadata(String logicalId, String& version, String language, String resolution, String xmlRequestedMetadata)
![1 star click here to know more emoji](https://community.rws.com/cfs-filesystemfile/__key/widgetfiles/70eb79f7675b42078f78355560839784-d/1star.png?_=638586179350645303)