Author Topic: FM Books Connector / Begin Session  (Read 3284 times)

david1000

  • Member
  • *
  • Posts: 21
FM Books Connector / Begin Session
« on: May 27, 2012, 06:43:28 PM »
I have set up a Filemaker script which begins a session with QuickBooks. However, I find the script only works correctly the second time it is run.
I have a script which registers the plugin which works correctly. I understand a session can be left open so I have included a script step to end any session left open but this has not fixed the problem. When running in debugging mode I simply get an error on the begin session step but only on the first time the script runs - the subsequent execution works perfectly. To temporarily get around the issue I have added a script step which checks the result of the first begin session step - it it returns an error I repeat the step which works. However, while this solves the immediate problem it doesn't explain why the first step fails each time.  Any ideas?

I am running Filemaker 12 Advanced, QuickBooks 11-12 (Aust), and FM Books Connector 4.0.0.3 with Windows 7.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: FM Books Connector / Begin Session
« Reply #1 on: May 28, 2012, 03:51:13 PM »
Do your users launch QuickBooks prior to the attempt to begin a session? Are there any other external applications accessing QB? Is the QB file hosted by another computer? If the user has not logged in, which Mode are you Requesting?

david1000

  • Member
  • *
  • Posts: 21
Re: FM Books Connector / Begin Session
« Reply #2 on: May 30, 2012, 08:56:31 PM »
Hi, here are the answers to your questions:
Do your users launch QuickBooks prior to the attempt to begin a session?
 - the project is being developed so there are not multiple users at this point
- I can currently begin sessions with QuickBooks open and when its not - but it's only successful on the second attempt every time.
Are there any other external applications accessing QB?
- No
Is the QB file hosted by another computer?
- No
If the user has not logged in, which Mode are you Requesting?
- I have tried with the user not logged in and logged in, as well as starting the session in single and multi modes.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: FM Books Connector / Begin Session
« Reply #3 on: May 31, 2012, 06:21:13 AM »
Do you always specify a path in the CompanyFile parameter of PCQB_BeginSession? If so, what happens when you use "" as the parameter and call the function after logging into the QB file?

david1000

  • Member
  • *
  • Posts: 21
Re: FM Books Connector / Begin Session
« Reply #4 on: May 31, 2012, 06:26:56 PM »
Thanks for your response.
I have been adding the path into the PCQB_BeginSession function. To test the suggestion I removed the path and have the QB file open as administrator but the result remains the same.
First time "!!ERROR!!" second time "0"

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: FM Books Connector / Begin Session
« Reply #5 on: June 01, 2012, 11:13:41 AM »
I don't have an Australian version of QB, nor am I currently running FMP 12. I'm left wondering if the issue is specific to the version of one or both in combination. Hope you'll post here if you find the cause or a solution.

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

david1000

  • Member
  • *
  • Posts: 21
Re: FM Books Connector / Begin Session
« Reply #6 on: June 01, 2012, 03:54:32 PM »
Hi, yes I will certainly post it here, when I do. For the moment. it appears the process of repeating the begin session request overcomes the problem.  As you say it may be specific to the Aust version and Filemaker 12. Thanks for you help.

david1000

  • Member
  • *
  • Posts: 21
Re: FM Books Connector / Begin Session
« Reply #7 on: June 03, 2012, 08:19:08 PM »
Still have the same problem and havent found and answer.  I suspect that it may be something to do with 64 bit operating system and software but that is only a guess.  It is just that I have noticed some other system tasks that seem to be similar (ie require a refresh or similar to happen). Anyway, will post if I find out anything new.

david1000

  • Member
  • *
  • Posts: 21
Re: FM Books Connector / Begin Session
« Reply #8 on: June 13, 2012, 05:26:26 PM »
Updated to QuickBooks Enterprise 2012/13 and it seems to have resolved this issue. Each begin session now responds successfully.