Scripting

  • 1.  Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 10:45
    Client has a UDF at the AR_InvoiceHistoryDetail and SO_SalesOrderHistoryDetail tables written to by ScanForce programming to capture a signature image filename. I then have a button script to display that image in Invoice History Inquiry Lines tab after passing the UDF field as a variable to the script. But I can't do that in Sales Order History Inquiry because the list of available variables only includes Header fields and not any Line fields. Is there a business reason for this? Or why else wouldn't I be able to see line fields here when I can for every other sales order and invoice business object?


  • 2.  RE: Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 10:49
    When you put a button on the panel, you are in the Header object. It doesn't know what line you are on in the grid. I don't believe there is any way to accomplish this without programming. In providex you can tell what ""Line"" you are on when you execute a button. With a button script it can't tell.


  • 3.  RE: Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 12:50
    @AmberPrayfrock I see what you mean. Line fields and UDF's are available to lines panel buttons in S/O Invoice History Inquiry, but not in S/O Sales Order and Quote History inquiry. I think the only button script solution would be to use script perform logic to which I believe @NicoleRonchetti refers. This involves setting a button MS Script variable to point to a ProvideX script. Google the variable name ""MAS_SCR_PFM"" for example usage.


  • 4.  RE: Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 12:53
    Thank you both! And Dan, I will take a look at that tip. There looks to be a few articles that pop up.


  • 5.  RE: Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 13:41
    Your can do something like this to get access to the lines, methinks: Set oLines = oBusObj.AsObject(oBusObj.Detail_Object) ' Detail_Object is your latent ingredient sItemCodeDesc = """" : sItemCode = """" retVal = oLines.GetValue(""ItemCode$"", sItemCode) retVal = oLines.GetValue(""ItemCodeDesc$"", sItemCodeDesc) ---------------- So similarly do oLines.GetValue on your UDF_ First be sure to be on the correct line / item then click your button. I dunno but try it.


  • 6.  RE: Client has a UDF at the AR_InvoiceHistoryDetail an

    Posted 09-26-2017 13:53
    Huh...I see where you're going with that and I like it!