Click or drag to resize

CustodianManagerUpdate Method

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

Namespace:  Law.EdaIntegration.Import
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
public void Update(
	Custodian custodian
)

Parameters

custodian
Type: Law.EdaIntegration.ImportCustodian
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 Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Import;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        // Retrieve the existing custodian
        Custodian 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
        {
            Custodian 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