Editar

Compartir a través de


IWorkItemFormNavigationService interface

Host service for opening the work item form

Methods

openNewWorkItem(string, {[fieldName: string]: Object})

Opens a new work item of the specified type. The host page will display the new work item in a dialog, or it may update the current page view, depending on the current page.

openWorkItem(number, boolean)

Opens the specified work item. The host page will display the work item in a dialog, or it may update the current page view, depending on the current page.

Method Details

openNewWorkItem(string, {[fieldName: string]: Object})

Opens a new work item of the specified type. The host page will display the new work item in a dialog, or it may update the current page view, depending on the current page.

function openNewWorkItem(workItemTypeName: string, initialValues?: {[fieldName: string]: Object}): Promise<WorkItem>

Parameters

workItemTypeName

string

The name of the work item type to open

initialValues

{[fieldName: string]: Object}

(Optional) A dictionary of any initial field values to set after opening the new work item.

Returns

Promise<WorkItem>

A promise that returns a work item when the work item dialog is closed. If the workitem was not saved before closing the dialog, the promise will return null

openWorkItem(number, boolean)

Opens the specified work item. The host page will display the work item in a dialog, or it may update the current page view, depending on the current page.

function openWorkItem(workItemId: number, openInNewTab?: boolean): Promise<WorkItem>

Parameters

workItemId

number

The id of the work item to open

openInNewTab

boolean

(Optional) If true, opens the work item in a new tab. Default is false

Returns

Promise<WorkItem>

A promise that returns a work item when the work item dialog is closed. If openInNewTab is true, the promise will return null