Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Handling Warnings in Connector - Using MSO screens

Handling Warnings in Connector - Using MSO screens

Handling Warnings in Connector - Using MSO screens

I am using Connector via Delphi to create Stores Sales Requisitions. When I get to item 3 on the second MSM14BA screen, I execute the command:
and then I may get a Warning message - Total Value Requires Authoristion. If I OK this with the command:
The requisition is created.
If I do the same actions manually via the MSO screens the second OK does not complete the req, but allows me to put item 4 on the same screen.
What am I doing wrong. Should the Warning messages be answered with an OK?  OR with some other command?

RE: Handling Warnings in Connector - Using MSO screens

You can check available commands using this VB codes.

sFuncKeys = "Function Keys/Commands on screen " & _
  Trim$(.Screen.MSO.Name) & vbCrLf
For iFuncKeys = 1 To .Screen.MSO.Commands.Count
  sFuncKeys = sFuncKeys & CStr(iFuncKeys) & " " & _
    .Screen.MSO.Commands(iFuncKeys).Name & "; " & vbCrLf
Next iFuncKeys
MsgBox sFuncKeys

Thanks to PhantomPhil for the code.

RE: Handling Warnings in Connector - Using MSO screens

You will have to enter the item 4 details prior to executing the OK.  Works the same using connector scripts or the online screens - you need to enter both items first.

RE: Handling Warnings in Connector - Using MSO screens

As noted by Drw, it should work the same using connector scripts or the online screens.

I think the logic of the online screens is: if you have filled up all items on the screen, then you will be presented with the next (blank) screen for further entry; if you enter some data, but do not fill the last item on the screen, then the assumption is that you have finished entering items, and you are then taken back to the calling screen.

As for Connector code:
I've found it best to know exactly what you are OK-ing. So do an explicit test for a warning before doing the gobjMIMSX.Screen.MSO.Commands("OK").Execute (otherwise you might not actually have a warning and might be Ok-ing a confirm step or something else)

I've found the following (VBA) connector code useful for testing for warnings:


If (Mid(Trim$(gobjMIMSX.Screen.MSO.Error), 11, 7) = "WARNING" _
   Or Mid(Trim$(gobjMIMSX.Screen.MSO.Error), 1, 1) = "W") Then
  'Warning, save message if necessary, then OK to dismiss warning
End If
In theory all Mims/Ellipse warning messages have a "W" in the first character of the error code string (whereas errors have an "X"). For you folk who have some sort of sysadmin access, you can see this indicator as the 11th associated character (ERROR SEVERITY) against codes on the "ER" table (via MSO011).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close