JSON API Guide → Reference → POST Functions → StartTransition
Starts a transition on an item.
The specified item will get a recordlock if the table uses record-locking. This record-lock is passed to the FinishTransition call.
Name | Type | Description |
---|---|---|
StartTransition | Function |
Starts a transition on an item. Use this function to lock the item and get current field values, as well as information about which fields are required or read-only in the transition. |
table |
|
The table identifier. |
item |
|
The item identifier. |
transition |
|
The transition to start. If 0, a valid Update transition is used (if found). Tip: Run GetItemTransitions first to determine the
transition identifier that you will specify.
Not all transitions have an internal name. Those that do return the internal name as dbname in the GetItemTransitions response. |
Name | Type | Description |
---|---|---|
itemOptions
(optional) |
ItemOptions |
Use itemOptions to limit the response data. When itemOptions are not included, all fields are sent in the response. When itemOptions are included, only the specified fields, plus fields required by the transition, are sent in the response. |
breakLock
(optional) |
boolean |
Allows the JSON API to steal the record lock from any user who might have one on this item, so that this call should not fail due to a user having the record locked. However, this causes any user who has a transition form open on this item to get an error when he or she tries to commit the transition. |
URL:
http://AEserverName/jsonapi/startTransition/1000/2/18
Post data:
{fixedFields: false, fields: [{dbname: "FUNCTIONAL_AREA"}], breaklock: true}
Response:
{ "startTransition": { "transition": { "id": 18, "name": "Re-Open", "uuid": "e44d9bfe-6d54-426e-a1ac-4711a09b6243", "type": "regular", "isQuick": false, "noteRequired": false, "urlRequired": false, "fileRequired": false, "itemRequired": false }, "item": { "id": { "id": 2, "uuid": "46ad4b77-4c8e-445d-b6d8-e84b71cfb8ab", "itemIdPrefixed": "BUG000002", "itemId": "000002", "url": "http://AEserverName:80/tmtrack/tmtrack.dll?...Template=view&TableId=1000", "itemLockId": 1719 }, "table": { "id": 1000, "uuid": "dc8cd329-b430-436f-bb75-bf90008e6a50", "name": "Issues", "dbName": "UBG_ISSUES" }, "fieldMetadata": [ { "id": 75, "name": "Functional Area", "dbname": "FUNCTIONAL_AREA", "syscode": 0, "type": "selection", "required": false, "readonly": false, "renderHtml": false, "sectionId": 2, "helpText": "", "isMultiSelect": false, "isSearchable": false, "selections": [ { "id": 0, "name": "(None)" }, { "id": 27, "uuid": "18f578a6-4953-4008-9c96-bdae21e615cb", "name": "Administrator" }, { "id": 28, "uuid": "a95673f2-5375-4eac-8070-4b4cd7391e7f", "name": "Help" }, { "id": 29, "uuid": "fbb29892-a25e-4b4c-9fc2-54b89d697dc2", "name": "Setup" }, { "id": 30, "uuid": "844cfc6d-64c3-45c4-94be-46dea304baf5", "name": "User Interface" }, { "id": 64, "uuid": "ce247e8c-e9d6-44b4-8020-41c9e1ec9177", "name": "Compiled Modules" } ] } ], "fields": { "FUNCTIONAL_AREA": { "id": 0, "name": "(None)" } } } }, "result": { "type": "OK", "msg": "" } }
None.
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.