Hi All. I have a suiteGL plugin that I'd like to ...
# suitescript
e
Hi All. I have a suiteGL plugin that I'd like to trigger from suitescript 2.1. Is this possible? Use case is grabbing freight vendor bill and applying to COGS on item fulfillment. Is there a non-suiteGL alternative? Thanks.
s
suiteGL plugins are triggered by the system, when a transaction is saved and the standard GL lines are created (or re-created). So, you can trigger that behavior by doing a record load / save of an applicable transaction. Any version of suitescript can do that.
e
Thanks for the reply. I tested what you suggested before posting here. Just tried it again, in case I missed something, without success. Editing and saving the record in the UI will definitely trigger the suiteGL plugin. However, loading and saving the record from a script will not. So close and yet so far ...
s
@Emanuel V that is very surprising, and I’d dare say would even constitute a bug. I have never seen an instance of a GL plugin not running in any context, unless the plugin had code to exit early under certain circumstances, which is possible. Are there any differences between the scripted load/save and the UI action? A different form perhaps? Also, is this a closed third party GL plugin? I wonder if you can view the code to see if it may be be exiting somewhere.
.Another thing to check is if the plug-in is running asynchronously or not. If it is asynchronous, it may not run right when the transaction is saved, and there could be a delay