I have been working on trying to send a journal entry (JE) to QBO and I can't quite get a grasp on how to create the object completely.
So I have my overall JE object and set the base values in that. Then, in each JE object there is an array of Line objects that correspond to each line in the JEs. Each line then has a DetailType that needs to be set to JournalEntryLineDetail and then you are supposed to create JournalEntryLineDetail object that houses more information for the line. However, where do you put this JournalEntryLineDetail object in the Line object? Do you attach it to the Line.AnyIntuitObject object?
I've been reading over the documentation and there is like no definitive answer that says "this is where the JournalEntryLineDetail goes" and I can't find an answer anywhere.
I currently have something close to this:
Dim je As New Intuit.Ipp.Data.JournalEntry()
Dim l As New Intuit.Ipp.Data.Line()
Dim jeld As New Intuit.Ipp.Data.JournalEntryLineDetail()
je.PrivateNote = "Something"
je.TxnDate = Now
l.Description = "Something Squared"
l.Amount = 100000000.00
l.DetailType = Intuit.Ipp.Data.LineDetailTypeEnum.JournalEntryLineDetail
jeld.PostingType = Intuit.Ipp.Data.PostingTypeEnum.Credit
jeld.AccountRef = 80
'Line to put jeld into the line - This is what I don't know how to do.
je.Line = {l}
NOTE:
This code does not reflect my actual coding abilities in terms of naming conventions, simply threw it together to get an example up.
EDIT:
Intuit JE Doc
Intuit Line Doc
When creating a JournalEntry object and saving the lines to the object, you do need to save the JournalEntryLineDetail to the Line.AnyIntuitObject
object.