LookupTable.CreateLookupTables Method

Creates custom field lookup tables and corresponding code masks.

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


<SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/LookupTable/CreateLookupTables", 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 Sub CreateLookupTables ( _
    ltds As LookupTableDataSet, _
    validateOnly As Boolean, _
    autoCheckIn As Boolean _
Dim instance As LookupTable
Dim ltds As LookupTableDataSet
Dim validateOnly As Boolean
Dim autoCheckIn As Boolean

instance.CreateLookupTables(ltds, validateOnly, _
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/LookupTable/CreateLookupTables", 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 void CreateLookupTables(
    LookupTableDataSet ltds,
    bool validateOnly,
    bool autoCheckIn



If you create a non-text lookup table such as type Cost, Date, Duration, or Number, you still need to programmatically create a code mask. Project Web Access hides the code mask for non-text lookup tables in the New Lookup Table page, but creates a code mask for the call to CreateLookupTable. For an example that creates a Duration lookup table, see CreateLookupTablesMultiLang. For more examples, see Using the ProjTool Test Application.

The pre-event for CreateLookupTables is LookupTableEventReceiver.OnCreating and the post-event is OnCreated.


The pre- and post-events for CreateLookupTables expose LookupTableMultiLangDataSet in the e parameter of event handlers, rather than a LookupTableDataSet.

To use datasets in event handlers, set a reference to the Microsoft.Office.Project.Schema.dll assembly. For more information, see How to: Write and Debug a Project Server Event Handler. For more examples, see Using the ProjTool Test Application.

Project Server Permissions




Modify the definitions of Enterprise custom fields and lookup table values. Global permission.


The following code is a pre-event handler for CreateLookupTables that gets data from different tables in a LookupTableMultiLanguageDataSet.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public class LookupTableEvents : LookupTableEventReceiver
    public override void OnCreating(PSLibrary.PSContextInfo contextInfo, 
        LookupTablePreEventArgs e)
        int lutLanguage = 
        Guid lutMultiUid = 
        string lutMultiValue = 
        . . .

See Also


LookupTable Class

LookupTable Members

WebSvcLookupTable Namespace


Other Resources

How to: Write and Debug a Project Server Event Handler

Using the ProjTool Test Application