05-23-2023 10:54 AM
BRApis that are prefix with “i” are used to go against the interface which means it is an unpublished BRApi and are subject to change at any point in time in a version without warning.
The use of such BRApis is discouraged. You can fill an unpublished API request and request to use the API. This will only be considered if using the unpublish API is absolutely necessary and the encrypted PartnerPlace solution requires it.
- How to retrieve the WorkspaceID in OS 7.3x
Private Function GetWorkspaceIDFromName(si As SessionInfo, workspaceName As String) As Guid
Using dbConnApp As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
Return EngineDashboardWorkspaces.GetWorkspaceIDFromName(dbConnApp, workspaceName, True)
End Using
End Function
- How to retrieve the WorkspaceID in OS 7.4x
Dim gValue As Guid = BRApi.Dashboards.Workspaces.GetWorkspaceIDFromName(si, isSystemLevel, workspaceName)
Sample code for parameterixed SQL in a OneStream business rule:
Const sql As String = "
SELECT DISTINCT [Name] As Name, [Name] As Value
FROM AuditBusinessRule
WHERE BusinessRuleType = @brvType
ORDER BY Name ASC"
Dim parameters As New List(Of DbParamInfo) From {
New DbParamInfo("@brvType", brvType)
}
Using dbConn As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
Using table As DataTable = BRApi.Database.ExecuteSql(dbConn, sql.ToString, parameters, True)
If table.Rows.Count > 0 Then
Return table
Else
Return Nothing
End If
End Using
End Using
Error Details:
Error message: "Error processing XML file type 'application Dashboards.' XML: Line 15, position 28, element. SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."
Workaround:
Change the customer's culture settings to US only during the solution load.
Once the load is complete, revert the culture settings back to their local culture.
Proceed with the initial solution setup. Changing the culture should help you bypass the error.