Button script to update a UDF on SO History Header



I'm trying to create a button script to update a UDF field on the SO History Header table.  It seems like a simple task, but I can't seem to figure it out.  I need to prompt for the date and then update the SO_SalesOrderHistoryInquiry_bus_UDF_RMA_CLOSED_DATE$ field.  Any help on how to do this would be greatly appreciated!

Thanks in advance!


PS If there is any documentation on scripting in Sage 100, that would also be a huge help.

  • 0

    This is what I have so far, but it doesn't update the field:

    If Not(IsObject(oUI)) Then
    Set oUI = oSession.AsObject(oSession.GetObject("SO_SalesOrderHistoryInquiry_bus"))
    End If

    retVal = oSession.AsObject(oSession.UI).MessageBox("Whatever you want to say")
    retVal = oBusObj.setvalue("SO_SalesOrderHistoryInquiry_bus_UDF_RMA_CLOSED_DATE$","06/06/2023")

    I also what an input box to get the date and not have it set to 06/06/2023.  

  • 0 in reply to Kevin Acorace

    I had to do this with a combination of scripts. I use a linked panel in A/R Invoice History Inquiry so i can show several UDF's and their current values, a button script for each UDF that runs on the client so I can use InputBox, and then each script calls a BOI script to SetValue the data.

    I'm not recalling why the method you're using, and I likely tried first, didn't work.

  • 0 in reply to connex

    Hello :  

    Thanks for the reply, but I'm confused about a few things.  What is a linked panel?  How do I get a button script to run on the client?  When I choose client, I get 424 errors.  How do I call a BOI script from the button?  It appears that you got this to work using an inquiry business object.  I have been told that what I'm trying to do is not possible.  I'm really hoping you are correct!  Thanks in advance for your continued assistance.


  • 0 in reply to Kevin Acorace

    Sorry I missed your question, but you've likely solve your issues at this point. A "linked panel" is sort of a sub-panel loaded via a button. In Customizer there is a Link button (like a chain link) that you used to create a button that can be a Dialog box as well as other things like a button (MS) script. In my situation, I was successfuly changing UDF's in AR_InvoiceHistoryDetail, but now I'm trying to change UDF's in the header of SO_SalesOrderHistoryHeader as you were, but I get a message about insufficient rights, but I have all rights. Did you get yours to work?