Discussions

 View Only
  • 1.  How to create an Automation that will trigger a script?

    Posted 03-31-2019 18:59
    I want to use the method of creating a trigger field to delete a record but do not want users to be configured to do deletes. I was reading some solutions that talked about having an automation that runs scripts, but when I try to create a new automation there is not an option for running a script.

    Is this possible?  If so, where do I find it?

    Thanks,
    Dean


  • 2.  RE: How to create an Automation that will trigger a script?

    Posted 04-01-2019 19:06
    Hi Dean,

    Deleting records is an option that is now available directly in an Automation. So using the same Automation logic you might use to trigger a record being added, changed, or copied to another table you can also trigger a record being deleted. For example when a Project record is marked as cancelled in the Status Field and the Authorization checkbox is checked it could trigger an Automation to delete that record as one of the steps. You can even set up a step first to copy that record to a Project Archive table first before running the delete if you wanted to capture all those records in case of accidental deletion. The users then wouldn't need to be given Delete permissions, the builder of the Automations would just need delete permissions. I do caution that automating deletions like that are something you want to be careful of as when data is deleted in QB it is removed unless you have a step in place to capture it first.

    Alternatively, to kick of a script that would not be something that Automations can do alone. It is possible to set up an Automation that can trigger a Webhook out to a service with a script or some other way to bring a script into play but our Automations do not have a step to specifically call a script built in. 


  • 3.  RE: How to create an Automation that will trigger a script?

    Posted 04-02-2019 23:26
    Evan's points above are definitely the route I would suggest if your end goal is primarily around deletions - but if you're still looking for other options - a couple options might be using Google Scripts (here is an community post and reference to a Kirk Trachy youtube video about using it for Imports). Another option is using AWS Lambda - probably a little bit more robust but definitely could do what you're looking for. 

    Chayce Duncan | Technical Lead
    (720) 739-1406 | chayceduncan@quandarycg.com
    Quandary Knowledge Base