By using this website, you agree to our Terms of Use (click here)
Always hit the API if there is no Valid license. If it's valid, then store some kind of "I'm valid" cookie in the Acumatica cache which hopefully won't live longer than a week so you don't have to keep hitting the API unnecessarily.
If the license is not valid, return the following message with no UI elements on the page. The behavior would be the same for every AugSQL screen that we build:
Sorry, in order to run AugSQL, you need to be be enrolled in the Course located at:
Once you're enrolled in the course, you need to register your Acumatica Instance here:
Version 0.6.0 handles this perfectly! I love it! And I like how the license check kicks in when a button is pressed rather than when a screen loads; I think that's totally fine.
When I press SELECT in a localhost environment, it runs as expected (1st screenshot below).
I can even press SELECT in a 127.0.0.1 environment which I wasn't expecting would work, but I'm very happy about (2nd screenshot below).
When I try pressing SELECT in an Acumatica SaaS environment that isn't licensed, I get a pop-up message (3rd screenshot below). I really like how the hyperlinks work, nice and clean.
Once I register the Installation ID of the Acumatica SaaS environment on the AugForums.com/MyLicenses page, I simply refresh the AugSQL (QQ900001) screen and, boom, now I can press SELECT and the query runs (4th screenshot below).
I love how clean this is!
This is currently handled via inspection of the license validity of Acumatica itself instead of inspecting host headers. If Acumatica is licensed, the check is performed. If it is not, no check is performed. Let's think to make sure there isn't some major loophole with this logic.
We tested and determined that you can't use AugSQL in an unlicensed Tenant on an Instance that has a licensed Tenant in it. That was the only loophole that I could think of so far.