Sage 100

 View Only
Expand all | Collapse all

(Reposted as I had it in the wrong Group) I'm try

  • 1.  (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 11:13
    (Reposted as I had it in the wrong Group) I'm trying to get a button script working in version 4.50.0.3 of MAS 200. The script works properly in RMA Entry, but it does not work in RMA Inquiry. I am passing in variables to the script. In RMA Entry, these variables get set properly. But in RMA Inquiry, they come across as blank. Seems like a bug, but I just thought I would post this in case I'm missing something obvious.


  • 2.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 11:46
    I believe you can't SetValue() on an Inquiry screen because: oBusObj.SecurityAccess = 0 Maybe you can evaluate LastErrorMsg


  • 3.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 11:49
    I'm just using a button script (i.e. BT_LINK_1), setting the Type to ""MS Script"", specified the File Name and passed in the Variable ""RA_Return_bus_RMANo$"". I'm not using the User-Defined Scripting.


  • 4.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 11:51
    It's also executing on the client, so I believe the scripting objects wouldn't be available to me either.


  • 5.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 12:18
    Ah I see. I've confirmed your finding too. May I ask what you're trying to do with your script (maybe there's another way)


  • 6.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 12:20
    The client has PDF files in a particular UNC path. Part of the filename of the PDF is the RMA No. The script opens the PDF file that is associated with the RMA when the button is pressed.


  • 7.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 12:32
    Seems like a bug, i was going to suggest a goofy work-around to use a udf check box to set off a user-defined script. But that won't work in inquiry anyway.


  • 8.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 13:04
    Don't know if you're aware of it but there is a PERFORM handle for scripting available to you. One way to get to it is have your Link button script have only this one line in it (something similar to this): MAS_SCR_PFM = ""../RA/RA_ShowPDF.m4p"" Then your RA_ShowPDF.m4p would be something like this: coBusiness'GetValue(""RMANo$"", tmpRMANo$) SYSTEM_HELP %SYS_SS'PathRoot$ + ""PDF\"" + tmpRMANo$ + "".pdf"" EXIT ! Substitute above path for UNC path


  • 9.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 13:55
    Thanks for the idea! I've done this before (performed to PVX code), not sure why I didn't think about it this time. Probably because the way I am doing it SHOULD work.


  • 10.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 17:12
    In 4.4 and above, all the Advanced #Scripting objects are available to use on Button Links as well. Dim rmaNo: rmaNo = """" retVal = oBusObj.GetValue(""RMANo"",rmaNo)


  • 11.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-17-2012 18:03
    I know, but the problem is that only works when you run the script at the server. If you run the script at the client the objects are not recognized. I need to run it at the client in order to launch the PDF at the client.


  • 12.  RE: (Reposted as I had it in the wrong Group) I'm try

    Posted 05-18-2012 07:24
    So true. Excellent point.