Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BOC MSO Problem 2

Status
Not open for further replies.

DSimpson

Programmer
May 13, 2002
3
0
0
AU
I am hoping someone can shed some light on a BOC problem we are having.

If we use objMIMS.screen.MSO.commands("OK") or objMIMS.screen.MSO.commands("Revert") or objMIMS.screen.MSO.commands("Cancel") then all is well.

However, if we use objMIMS.screen.MSO.commands("Create") to represent the F9 key in MSO88P or MSO960 then we get a run-time error. We tried also objMIMS.screen.MSO.commands("F9") without success. Function key overrides set in System Control Maintenance are 1 -> 1 .. 9 -> 9.

Any ideas?

Regards
DSimpson
 
Hi,

A quick test revealed the same issue ... bug. I'm on a recent version ... but not the latest, latest (client middleware and mimsx).

I have played with the code below. It connects to MSO960 and looks at its Commands ... and well now ... it says that there are 7 in total. Just after the loop, you can see them, I've listed them as debug IsCommand's. I reckon the first 5 are always the same.

No "Create" (and potentially no "Modify"). Instead there is "Validate"(6) and "Save"(7). mmmm ??? The next line of code executes a ... 7. I tried ... 6, but got an Input Required error. mmmm, it all makes me wonder.

Now is aint proof that it works ... but perhaps you can give it a try?:

objMIMS.screen.MSO.commands(7).Execute

If you want to run the code below, you'll need to replace the connect and disconnect functions and add a btnTest to a form.

Just generally, I reckon that any Connector(BOC) developers should hassle Mincom once in a while, to get the latest middleware and mimsx versions.

Thanks,

Peter.


Private Sub btnTest_Click()

Dim MSO960 As MIMSX.MSO
Dim bReturn As Boolean
Dim iCount As Integer

On Error GoTo Test_Err

' Check Ellipse Connection
If ConnectToEllipse = False Then Exit Sub

' Jump to MSO
bReturn = gxConnector.Screen.ExecuteMSO("MSO960", "", "", "N", "")
' BUG: bReturn is always False on my version

Set MSO960 = gxConnector.Screen.MSO

' Commands.Item starts from 1
For iCount = 1 To MSO960.Commands.Count

Debug.Print MSO960.Commands.Item(iCount).Name

Next

Debug.Print MSO960.IsCommand("Home")
Debug.Print MSO960.IsCommand("OK")
Debug.Print MSO960.IsCommand("Cancel")
Debug.Print MSO960.IsCommand("Revert")
Debug.Print MSO960.IsCommand("Help")
Debug.Print MSO960.IsCommand("Validate")
Debug.Print MSO960.IsCommand("Save")

' Lucky 7
MSO960.Commands(7).Execute

MSO960.Fields("ACCOUNT1I1").Value = "10000001"

Debug.Print MSO960.Fields("ACCOUNT1I1").Value

' Send it
MSO960.Commands("OK").Execute

Debug.Print MSO960.Error
' Error produced
'X2:0037 - ACCOUNT/COST CENTRE NOT ON FILE

' Always "Home" MSO's
MSO960.Commands("Home").Execute

' Disconnect
DisconnectFromEllipse

Exit Sub

Test_Err:

End Sub
 
Thanks, Peter. That worked well.

Regards
DSimpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top