Sage 100

 View Only
  • 1.  Edit UDF after posting

    Posted 07-14-2022 21:08
    Customer has a need to add certain comments and various dates after an SO invoice has been updated. This info is not available at the time of posting and might become available a month or two after the invoice is posted. I added UDF's to AR Invoice History Header but because it can only be accessed via Invoice History Inquiry, nothing can be added or changed on these UDF's. Everything is in Inquiry mode. Is there a way to make these UDF's editable? Is there a better way of tracking data after posting an Invoice? The UDF's need to be tied to either the SO or the IN.


    ------------------------------
    Kenny Daniel
    TechnoClarity, Inc.
    ------------------------------


  • 2.  RE: Edit UDF after posting

    Posted 07-14-2022 21:46
    Edited by Dan Burleson 07-16-2022 23:13
    I use a couple of methods.

    The 1st is to use a Custom Office button on A/R Invoice History Inquiry screen that pops-up a custom dialog with the UDF fields or if the UDF's are on the detail lines I modify the "Addition Fields" panel from the Lines tab and add them there. I put a button next to each UDF that invokes a BOI script that updates the corresponding UDF.


    Relevant BOI code:
    'Establish AR Invoice History Business Object
    r = oSS.nSetProgram(oSS.nLookupTask("AR_Invoice_UI"))
    Set oARInvoice = oScript.NewObject("AR_InvoiceHistoryInquiry_BUS", oSS)
    
    'Locate the invoice in history set field and write
    r = oARInvoice.nSetKey(sInvoiceNo&sHeaderSeqNo)
    r = oARInvoice.nSetValue(Column,Value)
    r = oARInvoice.nWrite()​

    The 2nd method uses MS Excel and what I call a Sage Table Editor.  I use the ODBC to read the Sage table into Excel. Minimally, the primary key(s) and fields to be edited. Having the field names as column headers allow for easy filtering of columns and row sorting.  Then I use VBA and BOI scripting to store any changes through to the underlying table. Global find & replace and fill down are particularly useful!



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    ------------------------------



  • 3.  RE: Edit UDF after posting

    Posted 07-14-2022 23:05
      |   view attached

     

    Kenny

     

    Here is a mod from DSD that may work.

     

    Thank you,

     

    Douglas Luchansky

    ACI Consulting

    p 714.282.0378 ext. 302    f 714.282.0235

     

    douglas@ACIconsulting.com

     

     

     

     




    Attachment(s)

    pdf
    R070700.pdf   1.03 MB 1 version


  • 4.  RE: Edit UDF after posting

    Posted 07-15-2022 11:05
    Button to prompt for a new field value, then write out a text file with InvoiceNo, HeaderSeqNo, NewUDFValue.  Then use a UDF specific VI import for the actual change.  (This causes a change of DateUpdated, if you use that for automated report filtering).
    For Premium, you could script direct SQL edits of the UDF values.
    Or store the peripheral values in a UDT, and use an invoice history button pop-up to show it on demand.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    ------------------------------



  • 5.  RE: Edit UDF after posting

    Posted 07-15-2022 20:04
    Thank you all for your help. One thing I'm failing to understand is where do I place all the fields and buttons that are being suggested. Anything I place on the Invoice History Inquiry screen cannot be edited. Customer is on Advanced 2021.2 so SQL is not an option...not that I'm a SQL guy anyway.

    ------------------------------
    Kenny Daniel
    TechnoClarity, Inc.
    ------------------------------



  • 6.  RE: Edit UDF after posting

    Posted 07-16-2022 04:03
    Edited by Alnoor Cassim 07-16-2022 04:11
    Kenny - Let me add a few thoughts. This has been done as a mod for a limited number of fields by several MDs (including me). Also, every idea posted here needs some kind of know-how to implement it. To answer your question and what comes subsequent to it:

    • Yes any UDFs you add come in as disabled but with a DFDM trick on the M4L file under the \AR\Custom\ folder you can remove the UDFs from the MAIN group. This makes them editable but not writeable. Any buttons you add will not be grayed out / disabled.
    • Creating a Customizer button that opens a dialog box and adding your UDFs and other button(s) on the dialog is what I recommend.
    • Several ways/tricks to write back, all made possible via adding a button to the dialog with a special purpose script behind it. Alternately, clicking OK to close the dialog can run the same script (tied to Panel On Exit). 
      • Dan's idea for button(s) to fire off BOI script which likely does a backdoor write-back via AR_InvoiceHistoryInquiry_bus (which is what allows V/I importing into AR Inv History)
      • Alnoor's idea of a Perform Logic button or a button's script to run Perform Logic, to update the changed values via backdoor.
      • Kevin's idea to fire off script to write out a text file of the changed UDF values for subsequent VI import
      • Kevin's other ideas and Dan's Sage table editor
    Hope that helps.

    ------------------------------
    Alnoor Cassim

    Email: alnoor.cassim@90minds.com
    Ph:
    ------------------------------