Hi All -
I am working on a script to update SO Invoice lines with cost code and cost type for a Job Costing project. We are using a button script for this as not all invoices are Job Cost related. The user can click and update cost code/cost types for all the lines when they are in appropriate invoices and wish to do so. The script logic does a loop through all the lines and a retval =olines.write at the end of each line loop. This appears to work fine and updates the lines as expected, however the grid does not refresh until going to the totals tab or main tab etc.
I searched around and looked in my class materials, but was unable to find an example of a button script that refreshes the grid. I found a write up about hiding a button on the main tab and then having the script 'click' it at the end of the script. I also saw things about InvokeChange and linesadded=-1.
What is the best way to refresh the grid? Anyone have a tried and true snippet for refreshing the grid after updating the lines?
thank you,
Marc