Hi,
I've got a requirement to save Quote PDFs so that Sales can provide a link to customers with their quote.
We have some code which listens to QO_Main being modified through a DB trigger, and syncs that Quote over to our CRM system. I added some logic to that which downloads the Quote PDF from the JIWA API and saves it somewhere.
Unfortunately, whenever a Quote is printed, the InvoicePrinted/QuotePrinted field is set to true, and the LastSavedDateTime is modified. This triggers that DB trigger, resulting in a loop (Quote modified => DB Trigger => Sync => Print PDF => Quote Modified => DB Trigger =>...).
Is there a way to print a Quote without triggering the JiwaFinancials.Jiwa.JiwaSales.SalesQuote.SalesQuote.Printed event, (or whatever is causing the above behaviour)?
If not, is there another way to solve this problem?
I'm looking into switching to a workflow where the PDF is downloaded from the API upon the user's request, but it currently takes about 4-7 seconds to get a response (have to lookup the report by name, then lookup the Quote by the InvoiceNo, then download the PDF...), but that's too slow.
Saving the Quote PDF on a recurring basis (e.g. every 30 minutes) isn't viable - Sales need to be able to send the quote immediately after creating the quote.
Thanks,
Joe