This documentation is archived and is not being maintained.

LookupTable.ReadLookupTablesMultiLangByUids Method

Office 2007

Gets the multi-language lookup tables and the corresponding code masks of specified list of lookup table GUIDs.

Namespace:  WebSvcLookupTable
Assembly:  ProjectServerWebServices (in ProjectServerWebServices.dll)

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/LookupTable/ReadLookupTablesMultiLangByUids", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/LookupTable/", 
	ResponseNamespace = "http://schemas.microsoft.com/office/project/server/webservices/LookupTable/", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public LookupTableMultiLangDataSet ReadLookupTablesMultiLangByUids(
	Guid[] ltUidList,
	bool autoCheckOut
)

Parameters

ltUidList
Type: []
Array of multilanguage lookup table GUIDs.
autoCheckOut
Type: System.Boolean
If true, automatically checks out the specified lookup tables for editing.

To create a multilanguage lookup table for test purposes, see the example in CreateLookupTablesMultiLang or see the LookupTables section in Using the ProjTool Test Application.

Caution noteCaution

Create test lookup tables only on a test installation of Project Server.

Project Server Permissions

Permission

Description

LogOn

Log on to Project Server. Global permission.

In the following code fragment, ReadOneMultiLangLUT reads a lookup table specified by the lutUid parameter. LookupTableWS is an arbitrary name for a reference to the LookupTable Web service. To test the code, add it to a sample application. For example, in the application described in How to: Log on to Project Server Programmatically, create a button and call ReadOneMultiLangLUT in the button click event handler.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
private const string LOOKUPTABLEWEBSERVICE = "_vti_bin/PSI/LookupTable.asmx";
private string baseUrl = "http://ServerName/ProjectServerName"/
private static LookupTableWS.LookupTable lookupTable =
    new LookupTableWS.LookupTable();

// Initialize the LookupTable Web service for Windows logon.
lookupTable.Url = baseUrl + LOOKUPTABLEWEBSERVICE;
lookupTable.Credentials = CredentialCache.DefaultCredentials;
. . . 
private void ReadOneMultiLangLUT (Guid lutUid)
{
    LookupTableWS.LookupTableMultiLangDataSet lutMultiLang =
        new LookupTableWS.LookupTableMultiLangDataSet();

    if (lutUid == Guid.Empty)
        lutUid = new Guid("1796cacc-5406-4c93-80cb-e7fb1271d32a");
    Guid[] lutUids = { lutUid };

    lutMultiLang = lookupTable.ReadLookupTablesMultiLangByUids(lutUids, false);
    string xmlFile = @"C:\Project\DataSets\MultilanguageLookupTableDataSet.xml";
    SaveDataSetToXml(lutMultiLang, xmlFile);
}
// Save the DataSet for examination.
private void SaveDataSetToXml(DataSet ds, string filePathName)
{
    ds.WriteXml(filePathName);
}
Show: