Plug-ins > FM Books Connector

Inventory Adjustment Activity

(1/1)

mvoogt:
I am trying to make a script that will adjust my inventory I will eventually put a loop before "InventoryAdjustmentLineAddList" and after "QuantityAdjustment" however in the attached photo it isn't there because I can't even seem to get one item to adjust let alone a list of items and I'm sure my problem in the script is before that.

Check out my attached screenshot of my script. I am in single user mode (which I understand to be required to do this in QB Premier). Am I just thinking about this the wrong way? What am I missing here.

I just want to adjust the On Hand Qty of items.

Thank you

Melinda DePalma:
Intuit requires the following conditions be met in order to add an inventory adjustment:
1) The QuickBooks company file must be open in single-user mode, unless you are using QuickBooks Enterprise edition, which allows multi-user mode for this request. (This is also true in the user interface: you cannot adjust the inventory while the company file is open in multi-user mode, again except for Enterprise.)
 
2)The inventory adjustment form must be closed in the QuickBooks user interface.

Can you please add some error trapping to your script so we can obtain a more detailed description of the error? I recommend creating a "check for errors" script and performing this script after all calls to BeginSession AND RqExecute. Here is a sample of a "check for errors" script taken directly from our demo file. We find most issues arise from a lack of error trapping. Please let me know the error description to better assist.

mvoogt:
Sorry, the error I am getting is:

CODE: -1000
SEVERITY: failed validation
MESSAGE: Error at ItemRef
Reason:   Element 'ItemRef' is unexpected according to content model of parent element 'InventoryAdjustmentAdd'.
Expecting: TxnDate, RefNumber, CustomerRef, ClassRef, Memo, InventoryAdjustmentLineAdd.

Field Value:   


The QB OSR says that ItemRef is required.

Thank you

Melinda DePalma:
"InventoryAdjustmentLineAddList" is not a valid field according to the OSR. You actually should be adding a related record using "PCQB_RqAddRelatedRecord( "InventoryAdjustmentLineAdd" ).

Page 9 of the "Developer's Guide" found in the original download will better explain with an example of how to add related records.

mvoogt:
Thanks so much. That was the problem. For anyone else that is interested in this post, here is my script that works.

Navigation

[0] Message Index

Go to full version