| IDocumentManagerById Method (Guid) |
Retrieves a Document by its unique identifier
Namespace:
EdaIntegrationContract.Document
Assembly:
EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 7.6
Syntax IDocument ById(
Guid id
)
Parameters
- id
- Type: SystemGuid
The unique identifier of the document to find
Return Value
Type:
IDocumentThe document with the supplied unique identifier
Exceptions Exception | Condition |
---|
EdaApiException | Thrown if a document cannot be found with the specified Id |
Examples
The following example demonstrates retrieving a document using its id.
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.Document;
class Sample
{
public static void Main()
{
var edaIntegration = new EdaIntegration().ConnectToExplore();
ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");
IDocument doc = edaCase.Documents.ById(15);
Console.WriteLine("Id: {0}", doc.Id);
if (doc.DocumentType == DocumentType.EDocument)
{
Console.WriteLine("File Name: {0}", doc.FileName);
}
else if (doc.DocumentType == DocumentType.Email)
{
Console.WriteLine("Subject: {0}", doc.EmailMetadata.Subject);
}
}
}
See Also