06-08-2018 11:22 AM
Hello
I need convert this script to Unity Script.
This script work in Thick Client bit in Unity show an error (DMCoreX is not supported.)
I have OnBase v15.0.2.141 SP2
Can anyone help me?
I appreciate your help.
This is the script.
Sub Main35()
Dim MyApp, MyDoc, MyKeys
Set MyApp = CreateObject("OnBase.Application")
Set MyDoc = MyApp.CurrentDocument
Set MyKeys = MyDoc.Keywords
Dim objConn, IDAsociate, query, objRs, ECLS
IDAsociado = MyKeys(3).Value
msgbox IDAsociate
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)" &_
"(HOST=xxx.xxx.xxx.xx)(PORT=xxxx))(CONNECT_DATA=(SID=XXXXXX)));Uid=xxxxx;Pwd=xxxxx;"
query = "select PEBEMPL_ECLS_CODE from PEBEMPL, SPRIDEN where SPRIDEN_ID = '"&IDAsociate&"' " &_
"and PEBEMPL_PIDM = SPRIDEN_PIDM and SPRIDEN_CHANGE_IND IS NULL"
objConn.Open
Set objRs = objConn.Execute(query)
if not objRs.eof then
ECLS = objRs.Fields(0)
call MyKeys.AddKeyword("RH ECLSCode", ECLS)
call MyDoc.StoreKeywords()
end if
objRs.Close
objConn.Close
End Sub
06-08-2018 11:53 AM
Hi Gilberto,
If you wish to convert a legacy API (DMCoreX API or Hyland Services API) to Unity API, you can check out this Community page where we discuss what you can do to transition from these legacy APIs to Unity API:
https://www.onbase.com/community/technical_communities/onbase_apis/legacy_api_conversion/b/weblog
That being said, the script looks like it's from the Sub Main35 of a VBScript that is executed in an OnBase Thick Client. The API being used in this entrypoint is the Thick Client API, not the DMCoreX API, so the link above will probably not help with your conversion. Thick Client API is still supported, and should work in v15. If you still need to convert this VBScript to a Unity Script because the user is moving to Unity Client, then you need to find out how the VBScript was being executed, and choose the appropriate interface for the Unity Script.
For example, if the VBScript was being executed in Workflow, then you need to create a IWorkflowScript interface script, or if the VBScript was being manually executed against a document that the user has selected, then create a IClientScript interface script, etc.
06-08-2018 11:53 AM
Hi Gilberto,
If you wish to convert a legacy API (DMCoreX API or Hyland Services API) to Unity API, you can check out this Community page where we discuss what you can do to transition from these legacy APIs to Unity API:
https://www.onbase.com/community/technical_communities/onbase_apis/legacy_api_conversion/b/weblog
That being said, the script looks like it's from the Sub Main35 of a VBScript that is executed in an OnBase Thick Client. The API being used in this entrypoint is the Thick Client API, not the DMCoreX API, so the link above will probably not help with your conversion. Thick Client API is still supported, and should work in v15. If you still need to convert this VBScript to a Unity Script because the user is moving to Unity Client, then you need to find out how the VBScript was being executed, and choose the appropriate interface for the Unity Script.
For example, if the VBScript was being executed in Workflow, then you need to create a IWorkflowScript interface script, or if the VBScript was being manually executed against a document that the user has selected, then create a IClientScript interface script, etc.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.