Skip to content

Latest commit

 

History

History
67 lines (38 loc) · 2.17 KB

Project.Application.MakeFieldEnterprise.md

File metadata and controls

67 lines (38 loc) · 2.17 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.MakeFieldEnterprise method (Project)
vbapj.chm2275
vbapj.chm2275
project-server
Project.Application.MakeFieldEnterprise
ba9564c9-faa6-bce6-0d59-05dee0cfc887
06/08/2017
medium

Application.MakeFieldEnterprise method (Project)

Adds a local custom field to Project Server as an enterprise custom field.

Syntax

expression. MakeFieldEnterprise( _FieldID_, _FieldName_, _LookupTableName_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
FieldID Required Long Identification number of the local custom field. Use the FieldNameToFieldConstant method to get the FieldID argument.
FieldName Required String Name of the enterprise custom field to create.
LookupTableName Optional String Name of the lookup table to create. The default value is an empty string ("").

Return value

Boolean

Remarks

When the MakeFieldEnterprise method completes successfully, Project shows a dialog box with the message, "The field was successfully added to Project Server. In order to view and use the enterprise field in the project, you will need to quit and restart Project Professional."

The MakeFieldEnterprise method corresponds to the Add Field to Enterprise command in the Custom Fields dialog box. The method is available only in Project Professional. Project Professional must be connected to Project Server.

Example

To use the following example, create a local custom field, such as a task text custom field, named LocalWithLUT2Enterprise. Add a lookup table for the custom field that has some values.

Sub Local2Enterprise() 
 Dim localId As Long 
 localId = FieldNameToFieldConstant(FieldName:="LocalWithLUT2Enterprise") 
 
 MakeFieldEnterprise FieldID:=localId, FieldName:="NewTaskTextFromLocal", LookupTableName:="NewTaskTextLUTFromLocal" 
End Sub

[!includeSupport and feedback]