Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: CstDskSol on February 14, 2011, 03:45:33 PM

Title: Pushing a new item to inventory.
Post by: CstDskSol on February 14, 2011, 03:45:33 PM
I am trying to build a script that pushes a new item to QBP inventory file. (see attached)
I'm getting an error 3180 saying that the new item couldn't be saved because I must specify an income account.
Anyone know how to specify an income account?
Thanks,
Mark
Title: Re: Pushing a new item to inventory.
Post by: Geoffrey Gerhard on February 15, 2011, 09:49:12 AM
Do you know the name of the Full Name value of the Income Account in QB? If the full name of the Income Account is "Sales", you'd use this:

PCQB_RqAddFieldWithValue( "IncomeAccountRef::FullName" ; "Sales" )

You'll also need to identify the Expense and Asset accounts for your Inventory Item. Again assuming you know their full names, you'd use...

PCQB_RqAddFieldWithValue( COGSAccountRef::FullName ; "Cost of Goods Sold" )
PCQB_RqAddFieldWithValue( AssetAccountRef::FullName ; "Inventory Asset" )

...substituting your own account names for "Cost of Goods Sold" and "Inventory Asset".

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
Title: Re: Pushing a new item to inventory.
Post by: CstDskSol on February 15, 2011, 03:28:24 PM
I got it figured out, thanks.
Turns out the order you populate the fields in, makes all the difference.
I have attached a screen shot of the script if anyone else needs it.

Thanks for the help.
Title: Re: Pushing a new item to inventory.
Post by: PrinceBaskar on March 31, 2011, 02:38:58 PM
I got it figured out, thanks.
Turns out the order you populate the fields in, makes all the difference.
I have attached a screen shot of the script if anyone else needs it.

Thanks for the help.

Two questions:

1) For some unknown reason I can't open this JPEG file with the code sample to add and Inventory Item. It's a problem on my side or is a corrupted file?
2) The demo FMBooks Filemaker DB didn't have the scripts available to see how works. There is a way to access this info?

Thanks for the answers.