Click or drag to resize

ICustodianManagerUpdate Method

Updates the system with any changed values for the custodian (also see Remarks below)

Namespace:  EdaIntegrationContract.Import
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 1.0
Syntax
C#
void Update(
	ICustodian custodian
)

Parameters

custodian
Type: EdaIntegrationContract.ImportICustodian
The custodian containing the updated data to save
Exceptions
ExceptionCondition
EdaApiExceptionThrown if the custodian name is invalid
Remarks
If any documents belonging to the custodian have already been indexed, and the custodian's name is changed, then the case will automatically be queued to re-index so that the index can be refreshed with the new custodian name.
Examples
This example demonstrates updating the name of an existing custodian.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.Import;

class Sample
{
    public static void Main()
    {
        var edaIntegration = new EdaIntegration().ConnectToExplore();
        ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        // Retrieve the existing custodian
        ICustodian custodian = edaCase.Custodians.ByName("Custodian 3");
        Console.WriteLine("({0}) {1}", custodian.Id, custodian.Name);

        // Change its name and save it back
        custodian.Name = "Third custodian";
        edaCase.Custodians.Update(custodian);
        Console.WriteLine("({0}) {1}", custodian.Id, custodian.Name);

        // Attempting to lookup the custodian using the old name 
        // will fail now
        try
        {
            ICustodian prevCustodian = edaCase.Custodians.ByName("Custodian 3");
        }
        catch (EdaApiException ex)
        {
            Console.WriteLine("Exception: {0}", ex.Message);
        }
    }
}
/*
This example produces the following results:

Id: 3,  Name: Custodian 3
Id: 3,  Name: Third custodian
Exception: A custodian with the specified Name does not exist - Custodan 3 
 */
See Also