Is there a way to access the db connection(for temp tables) that Sage uses in vbscript?

SOLVED

On the customization of the SO form, can we access the db connection that Sage is on for updating the temp tables, which otherwise are not accessible from another connection.

  • 0

    First question I have is what reason would you have to modify what is in the temp tables?   Customizer is a great tool, but trying to modify the core business logic of the task to include the data in the temp tables is not considered a best practice and could lead to invalid or corrupt data.   Could what you are trying to accomplish be done after the sales order is created/updated?

    If not you might want to consult with your reseller to find the best solution to the problem to see if could be accomplished in another manner.  If after reviewing the issue and you still need to do a customization you have better options than using Customizer which isn't always reliable as a heavy duty development tool.

    These are:

    1. Purchase the Sage 500 SDK and source code for the Sales Order Module.  Using VB 6, make the necessary modifications to a custom version of the sales order entry program that accomplishes what you need it to do.  With VB 6 you will have a full development platform to include debugging capabilities you do not have in Customizer as well as full access to the Sage 500 Framework..
    2. Create a Sage 500 .NET task that uses a modified version of Sage 500's Sales Order API.   Though you have access to the Sage 500 Framework, you do not have access to controls that were available in VB 6, so you would have to work around those limitations.
    3. Engage with a Sage 500 Partner that does development work to assist with the design of the modification you need and develop it.

        Again Customizer is a great tool, but its original intent was never to do the type of customization you are proposing here. Such a customization would not be supported by Sage in any case. There are other alternatives that are better for this and with a good solid design upfront can minimize the risk for invalid data and data corruption.

  • 0 in reply to LouDavis

    Hi, We are using an external application that would be called on the SO Entry form which will calculate the tax for the document using an external tax engine. When we update the tax tables, we are not able to see the taxes on the form. We are updating the tciSTaxCodeTran and tsoSalesOrder  tables with the calculated tax, but are not able to view them on the form. So, was wondering if we are able to update the temp tables that might solve the issue

  • 0 in reply to Anjana

    This is definitely out of the realm of Customizer as there is a lot going on when dealing with taxes in Sage 500.  Having done this type of modification before, there is a bit of work to do to accomplish what you need and being familiar with the tax processes within Sage 500 is a must.   You may want to discuss your needs with your reseller and determine the best course of action to import the tax information from the external source and process it with Sage 500.  Depending on the results of that, besides a modification to the Sales Order entry screen, you may need to have modifications made to the  sales tax objects with Sage 500 as well to properly import the tax information.

  • 0 in reply to Anjana

    If you already have a significant investment in the external application, this may not make sense, but have you looked into using Avalara's AvaTax sales tax solution for Sage 500 (a.k.a. "Sage Sales Tax")?

  • 0 in reply to Anjana

    Are you willing to share your experiences with this?

  • 0 in reply to mbegalle

    Who are you asking Doug or myself?  If me, my experience with integrating an external sales tax system with Sage 500 required the creation of a COM compliant .NET assembly that could be call from Sage 500 to request the information from the external sales tax system's web service.  In addition to the assembly, I had to make modifications to Sales Order Entry, the tax logic of Sage 500, and add a new screen to track tax information from the external tax service and any failed calls to it.   This included changes to both the client and the database.

    Your situation may be different, so again I emphasize  working on a solid design of what you want to accomplish as well to determine what you will need to do to accomplish it before doing coding will help you in the long run and save you a lot of stress and heartache.

  • 0 in reply to LouDavis

    I was hoping to get Anjana's experience. Is it possible to call a web API from customizer?

  • +1 in reply to mbegalle
    verified answer

    You can use vbScript to call a SOAP  or a RESTful web service.  Here are links to some examples:

    SOAP
    https://www.example-code.com/vbscript/soap_web_service.asp

    RESTful
    https://www.example-code.com/vbscript/rest_simple.asp