Search code examples
c#quickbooksquickbooks-onlineintuit-partner-platform

JournalEntryReferenceType object, what is Value?


I've been working with the SO solution found here. So far everything is working OK until I receive an IntuitBatchResponse "Invalid Reference Id" error stating that "Something you're trying to use has been deleted. Check the fields with accounts, customers, items, vendors or employees." I've verified with our accounting team that the account in question is active.

So my question is this - in the following line of code, what does the 'Value' property refer to?

journalEntryLineDetail.AccountRef = new ReferenceType() { name = "Accumulated Depreciation", Value = "36" };

So far I have verified that it's NOT the account number or the amount of the transaction. Intuit's online documentation for this (https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/030_entity_services_reference/journalentry) doesn't appear to have any indication of what this refers to in the accounting world. Has anyone come across this or had any experience in this area?


Solution

  • When you do a query on Account- select * from Account

    Then for this Account- Accumulated Depreciation, there must be some ID attached. When you create the JE, you need to pass the name and Id of that account as Value.

    Also, if you get this error for any entity, always check for the all the ref fields like CustomerRef or AccountRef or VendorRef or ItemRef or EmployeeRef and Value/Id against it. For Eg: IF JE has an AccountRef with Value='16', then query -select * from Account where Id='16' and see this is active(Active=true). Similarly check for other ref fields in the transaction to see if they are not deleted/inactive and correct your original entity/transaction to resolve this error.