Sage 100

 View Only
  • 1.  Script for Job Cost Change Order grid with Advanced Change order from DSD

    Posted 04-02-2024 12:29
      |   view attached

    Sage 100 Premium 2022, trying to script the Change Order tab of Job Maintenance to work with a UDF, and running into something strange.  The change order lines are save in JC_JobTransactionDetail with a Transaction Type of "0", and though the grid clearly shows a Cost Type field, the Cost Type field in the data for TransactionType 0 is always blank, and retVal = oBusObj.GetValue("CostType$",sCostType) always comes up as blank.  How do I get the value from the field being displayed in the grid? (The UDF I need to work with is only for Transaction Type of Labor.)

    TIA

    Phil



    ------------------------------
    Phil McIntosh
    Friendly Systems, Inc.
    ------------------------------


  • 2.  RE: Script for Job Cost Change Order grid with Advanced Change order from DSD

    Posted 04-03-2024 11:07
    Edited by David Speck II 04-03-2024 11:08

    What table and event do you have the script attached to?

    From what I can tell, the Change Order tab is normally only loaded with records from JC_JobTransactionDetail where TransactionType$ is equal to "0" ("Contract Change Order" according to the File Layouts), and as you said, the CostType$ column for these records should be blank.

    Since you mentioned a DSD enhancement, have you checked the table with either DFDM or SSMS to see if the data is in another column, like one that starts with the developer code?

    I'm not familiar with the enhancement so I can't really comment on it but you might want to check for the existence of an auxiliary table that starts with the developer code.  It could be that the non-stock columns are being written to another table.

    If you enable Debug mode in the Sota.ini, you can open the command window and type msgbox cobusiness'changeorderobj'getdatasources$() to see if there are any child data sources that might be retrieving the value to be displayed in the grid.  This is what I got on my stock system.



    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------



  • 3.  RE: Script for Job Cost Change Order grid with Advanced Change order from DSD

    Posted 04-04-2024 09:59
      |   view attached

    Well this just gets better and better...Command Windwo gerneates a panel processing error



    ------------------------------
    Phil McIntosh
    Friendly Systems, Inc.
    ------------------------------



  • 4.  RE: Script for Job Cost Change Order grid with Advanced Change order from DSD

    Posted 04-04-2024 10:46

    Open a new instance of Job Maintenance but do not load a job yet, place the cursor in the job number field, then open the command window.  That error sometimes occurs when focus is on something that it doesn't expect when you try to open the command window.  The easiest way around this that I have found is to make sure the cursor is in an multi-line control that is not disabled or locked.

    Once the command window is open, you can then load a job and go to the lines tab, then try clicking Halt on the command window and type the code in my previous message.



    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------