Search code examples
acumaticaacumatica-kb

How can I automate the creation and SFTP transfer of a snapshot in Acumatica?


I would like to create a nightly snapshot of certain tables in my SAAS-hosted Acumatica instance and SFTP the resulting XML file to a given location. (I've created a custom Export Mode option for just the tables of interest.)

I would like to do this process through an Acumatica Automation Schedule, a custom Action that I can call through the API, or an API call to existing Acumatica Actions, or some combination of the above.

However, it doesn't appear that these options are available to me:

  • Automation Scheduling doesn't support snapshot creation (https://feedback.acumatica.com/ideas/ACU-I-570)
  • I tried adding the Action to create a snapshot to the web service endpoint, but it doesn't appear that I can pass the parameters I would need to manage the pop-ups
  • Attempting to create a custom Acumatica button, I'm also to struggling to figure out how to raise and manage the pop-ups.

Once I have the snapshot created, I presume I will need to be able to download it locally in order to SFTP it to my desired location; I haven't gotten far enough to know if I invoke the download snapshot button through the API where the resulting file will go.


Solution

  • June, When I get stuck with stuff that I am unable to trigger with ReST or other integration techniques I generally turn to Selenium as the path of least resistance. I do want to point out I always err on the side of using selenium as a last resort. I generally like to use the PowerShell selenium module for stuff like this. Once you have your script working you can wire it into a standard Windows Scheduler real easy. It may not be the most elegant way to do it but it will certainly get the job done. if your interested you can get started with this

    https://github.com/adamdriscoll/selenium-powershell/blob/master/README.md

    Once you get familiar with it you use the chrome inspection tool to dig into the elements that you need to target. the dialog boxes you are after are often found as iframes within the page.

    I can share some of my scripts to help you get started if you want to try this route.

    I hope this helps. Robert