How to trigger Custom GL Plugin line script which ...
# suitescript
d
How to trigger Custom GL Plugin line script which is implemented on VendorBill, when the Vendor Payment is voided?
s
The only way that SuiteGL plug-ins are triggered is when the transaction itself is re-saved/re-submitted, either via script or through the UI. You'd need to find some way, possibly through a User Event script deployed on the Vendor Payment, to load and save the Vendor Bill. You don't need to make any changes to the record. Re-saving it will cause all of the Standard GL lines to be computed again, as well as any Custom GL plug-ins to be run.
d
I have around 2000+ Vendor Bills on the Vendor Payment
any ways to overcome?
s
What are you trying to overcome? I am not sure what your scenario is. Has the voiding of the vendor payment already happened? What is your Vendor Bill custom GL plug-in doing that it would be affected by the vendor payment? SuiteGL plug-ins are designed to run when a transaction is updated, and therefor when there is a chance that the GL impact may have changed. If you need the custom GL lines updated under different scenarios outside of the transaction being updated, you will need further customizations apart from just the GL plug-in itself.
d
if I delete or void the Vendor Payment, I need reverse/delete the custom lines already added when the bill was created (bill in Open State)
s
What does the custom GL plug-in do for the vendor bills that is not already accounted for by the standard GL lines? Usually your bills will have standard GL lines that hit an AP account as credits, then the vendor bill lines will have hit the same AP account with debits, all of which would be standard accounting.