【问题标题】:Quickbooks Online Api SDK c# - Is there a way to create and update hidden custom field for bill with use apiQuickbooks Online Api SDK c# - 有没有办法使用 api 为账单创建和更新隐藏的自定义字段
【发布时间】:2026-02-01 18:50:01
【问题描述】:

我们需要为实体添加像officeId这样的服务信息。

或者我们如何使用 IntuitAnyType 来设置和获取我们的服务信息。我尝试将 xmlElement 添加到 IntuitAnyType,然后创建账单,但是当我尝试获取此账单时,IntuitAnyType 字段 (BillEx) 为空。我还尝试添加 NumberTypeCustomFieldDefinition 并引发了验证异常。详细信息:操作找不到相对资源:/v3/company/4620816365019493550/numbertypecustomfielddefinition of full path: https://c50.sandbox.qbo.intuit.com/qbo50/v3/company/xxxxxxxxxxx/numbertypecustomfielddefinition?minorversion=29&requestid=a52a148d0f6f4c3ab366f55ca7440525 is not supported..

var dataService = new DataService(_serviceContext);
var officeId= new QBO.NumberTypeCustomFieldDefinition()
{
     DefaultValue = 0,
     DefaultValueSpecified = true,
     Name = "OfficeId",
     Hidden = true,
     EntityType = QBO.objectNameEnumType.Bill.ToString(),
     Required = false
};
var createdCaseIdField = dataService.Add(caseId);

有可能吗?

【问题讨论】:

    标签: c# advanced-custom-fields quickbooks quickbooks-online


    【解决方案1】:

    有没有办法使用 api 为账单创建和更新隐藏的自定义字段

    没有。自定义字段只能通过 UI 创建,并且在 UI 中可见。

    这里都有记录:

    【讨论】:

    • 感谢您的回答。也许您知道如何使用 api 获取账单的所有字段?当我尝试获取账单备忘录时,此字段为空