A Sandcastle Documented Class Library

# ITokenService CreateGlobalDataToken Method

Creates a new global data token based on the specified data source element.

Namespace: Dundas.BI.Data.Parameters.Tokens
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    DataToken CreateGlobalDataToken(
    	string tokenName,
    	Guid projectId,
    	Guid sourceStructureId,
    	string elementName,
    	TokenDataCategory category
    )

    Function CreateGlobalDataToken (
    	tokenName As String,
    	projectId As Guid,
    	sourceStructureId As Guid,
    	elementName As String,
    	category As TokenDataCategory
    ) As DataToken

    DataToken^ CreateGlobalDataToken(
    	String^ tokenName,
    	Guid projectId,
    	Guid sourceStructureId,
    	String^ elementName,
    	TokenDataCategory category
    )

    abstract CreateGlobalDataToken :
            tokenName : string *
            projectId : Guid *
            sourceStructureId : Guid *
            elementName : string *
            category : TokenDataCategory -> DataToken

#### Parameters

tokenName
  Type: System
  String
  The token name.
projectId
  Type: System
  Guid
  The project ID.
sourceStructureId
  Type: System
  Guid
  The token identifier.
elementName
  Type: System
  String
  The element name.
category
  Type: Dundas.BI.Data.Parameters.Tokens
  TokenDataCategory
  The data token category rule.

#### Return Value

Type: DataToken
Exceptions

Exception | Condition
--- | ---
ArgumentException | projectId or sourceStructureId is Empty.
ArgumentException | category is not a valid TokenDataCategory. -or- the specified source structure is not a DataCube or a NativeStructure.
ArgumentException | tokenName or elementName is or Empty.
NotFoundException | The specified source structure or the data element cannot be found.
NoPrivilegeException | The caller does not have permission to update the token. -or- The caller does not have permission to update the token for the token tenant.
InvalidSessionException | The caller context is not associated with a valid session.

See Also

#### Reference

ITokenService Interface
Dundas.BI.Data.Parameters.Tokens Namespace