External Link VBScript to Update Bitmap of Button that Called it

SOLVED

I created a button that runs a simple VBScript that checks if a customer is set up on paperless or not. The problem is that while I am modestly proficient at VBS, I don't know anything about the Sage Object model.

I first attempted to have the script display a MsgBox, but received an Access Denied error when I attempted to run it. So now I am wanting to try something else (which would be better anyways as the user will not have to close a dialog box when the script runs). Once the script determines a True/False value, I am wanting to add a bitmap to that same button that called the script. For example:

  • If the result is True, then I want to update the button with the "Checkmark" bitmap
  • If the result if False, then I want it to update the button with the "Delete" bitmap:


The name of the button/link is BT_LINK_1. I am just wanting to know the proper syntax to update the button's Bitmap selection from within the script. This is my pseudocode for further illustration:

If RetVal Then
BT_LINK_1.Bitmap = "Checkmark"
Else
BT_LINK_1.Bitmap = "Delete"
End If
Parents
  • +1
    verified answer

    Pop-up will be much easier.  Changing UI elements dynamically is always hard to get working properly.

    VBScript's MsgBox won't work with client / server versions of Sage 100, so there is a MessageBox method to use which solves that problem:

    retVal = oSession.AsObject(oSession.UI).MessageBox("", sStringVarWithWhatYouWantToSay)

Reply
  • +1
    verified answer

    Pop-up will be much easier.  Changing UI elements dynamically is always hard to get working properly.

    VBScript's MsgBox won't work with client / server versions of Sage 100, so there is a MessageBox method to use which solves that problem:

    retVal = oSession.AsObject(oSession.UI).MessageBox("", sStringVarWithWhatYouWantToSay)

Children