How to SQL query to ServiceManagement DB (Portal)
I have just populated some extra field to the ReleaseRecord class, and I will like to create a SQL query and show the fields on the portal.
But I cant find the fields in the workitem DB ?
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Hi Kenneth
Extended properties are not cached into the ServiceManagement DB. You will have to join your SQL query to tables in the ServiceManager DB. They will be in a table of the class extension name or all extensions of a class are available from a view with the name of the base class.
EGSELECT WorkItemId, Extended.CustomField1_75DF0BE8_3446_F616_6AC0_8510B74838AF FROM WorkItem JOIN ServiceManager.dbo.MTV_System$WorkItem$Incident Extended ON WorkItem.Id = Extended.BaseManagedEntityId
5
Answers
Extended properties are not cached into the ServiceManagement DB. You will have to join your SQL query to tables in the ServiceManager DB. They will be in a table of the class extension name or all extensions of a class are available from a view with the name of the base class.
EG
SELECT WorkItemId, Extended.CustomField1_75DF0BE8_3446_F616_6AC0_8510B74838AF FROM WorkItem JOIN ServiceManager.dbo.MTV_System$WorkItem$Incident Extended ON WorkItem.Id = Extended.BaseManagedEntityId