我想知道使用QuickBooks SDK.我有一份从快速书中获得的员工列表,如何获得我在QuickBooks中为员工设置的自定义字段?
还有员工的内置字段,有一个"职称",SDK有一个JobTitle,但它总是为空?
无论如何要获得自定义字段和职称?
谢谢
这是我用来在QuickBooks中获取雇员对象的代码,但是我需要获取自定义字段和JobTitle(但JobTitle始终为null,即使它在QuickBooks中设置).
using QBFC12Lib;
QBSessionManager sessionManager = null;
try
{
// create the session manager
sessionManager = new QBSessionManager();
sessionManager.OpenConnection("", "Test Employee");
sessionManager.BeginSession(@"C:\PathTo\CompanyFile.qbw", ENOpenMode.omDontCare);
//Create the message set request object to hold our request
IMsgSetRequest request = sessionManager.CreateMsgSetRequest("US", 8, 0);
request.Attributes.OnError = ENRqOnError.roeContinue;
// create the employee query
IEmployeeQuery employeeQuery = request.AppendEmployeeQueryRq();
// send the request and get the response from QuickBooks
IMsgSetResponse responseMsgSet = sessionManager.DoRequests(request);
IResponse response = responseMsgSet.ResponseList.GetAt(0);
IEmployeeRetList employeeRetList = (IEmployeeRetList)response.Detail;
if (employeeRetList …Run Code Online (Sandbox Code Playgroud)