Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: Scott Toland on January 10, 2013, 12:28:04 PM

Title: Opening QB from a script
Post by: Scott Toland on January 10, 2013, 12:28:04 PM
Hi,

I cant seem to find a way to open QB from a script.  I have a Bot machine that currently runs a bunch of automated process', I want to do this for some QB integration, but I am having trouble finding the code that will say to QB from Filemaker to open up and then when the job is complete I want to be able to say to QB Close.

Does this plugin allow this?

Thanks,

Scott
Title: Re: Opening QB from a script
Post by: Vattas on January 13, 2013, 05:34:24 PM
To open:

Use the Send Event [ "aevt"; "odoc"; "CMD /C " & "\"" & FMBOOKS::qbCompanyFile_t & "\""]

or

Open URL [No dialog; "file://" & FMBooks::qbCompanyFile_t]


"FMBOOKS::qbCompanyFile_t" is the the Table::Field containing the file location and I also attached a script containing the PCQB_Browse function.


To Close:

Send Event [ "aevt"; "odoc"; "CMD /C TASKKILL /F /IM QBW32.exe /T"]


I have not tested how this will respond when there is an update warning when QuickBooks is opening or backup request on closing.

--
Mark Wilson
Title: Re: Opening QB from a script
Post by: Scott Toland on January 15, 2013, 09:43:14 AM
Thanks for the reply!

I was hoping that there was a function built into the plugin to handle this process.  I know in the plugin that productive computing (Cant remember name off hand) bought had this function built in.

Anyhow I can use your coding you provided to achieve the same result.

Thanks again for your help.

Scott
Title: Re: Opening QB from a script
Post by: johnlewisdesign on February 13, 2013, 10:09:08 AM
OK here's an update - it appears to loop around all line items, then send an empty portal row with the variables from the previous one. I think I have sussed it now. Will feed back if not! Must be our scripting :)