I am using the SDK for QuickBooks Online. I am passing CLASS to Journal Entry Lines. I checked to make sure that using Classes is activated.
Class is not showing up.
Any ideas? My client needs to have the CLASS in the line items of the journal entry.
Thanks for any assistance here.
Jean
Here is the code (C#)
string CurrentModule = “AddCreditLine”;
Line creditLine = new Line();
JournalEntryLineDetail creditLineDetail = new JournalEntryLineDetail();
try
{
creditLine.Amount = decimal.Parse(strCRAmount);
creditLine.AmountSpecified = true;
creditLine.Description = strCRMemo;
Account assetAccount = _qboService.FindAccount(strCRAcctNum);
creditLineDetail.AccountRef = new ReferenceType() { type = Enum.GetName(typeof(objectNameEnumType), objectNameEnumType.Account), name = assetAccount.Name, Value = assetAccount.Id };
creditLineDetail.PostingType = PostingTypeEnum.Credit;
creditLineDetail.PostingTypeSpecified = true;
if (OtherName.Length > 0)
{
creditLineDetail.Entity = new EntityTypeRef() { EntityRef = new ReferenceType() { name = OtherName } };
}
if (strCRClass.Length > 0)
{
creditLineDetail.ClassRef = new ReferenceType() { name = strCRClass };
}
creditLine.DetailType = LineDetailTypeEnum.JournalEntryLineDetail;
creditLine.DetailTypeSpecified = true;
creditLine.AnyIntuitObject = creditLineDetail;
}
catch
{
creditLine = null;
}
return creditLine;
New contributor
t3chlady is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.