I am trying to work around a Catch-22 in button scripting for Sage 100 2020 Premium. Customer uses a separate program for their business which outputs a text file on the local workstation (always the same file name in the same place - used by multiple users so can't put it to a network path). The output file needs to be read and have the text added to the comment field on the last item on the sales order where ItemType = "1".
The Catch-22 is that I can't get a Lines object without setting the script to run at the server, but I can't get the local C: drive read unless it is run at the client...
Possible solutions:
(1) Script at Client that reads the file, Saves the order, writes the comment via SQL, reloads the order. Issues: SQL credentials in the script or create ODBC connections on multiple workstations. Is reloading the grid possible with run at Client?
(2) One button run at Client reads the file, sets storage variable with the text, then invokes another button (preferably invisible - we don't want the users clicking it directly) set to run at the server, which reads the storage variable, finds the last line and writes the comment text. Issue: Is this possible?
Third option welcome as well...
TIA,
Phil
------------------------------
Phil McIntosh
President
Friendly Systems, Inc.
Asheville NC
678.273.4010 ext 5
------------------------------