尝试通过Setup->Company information
访问Account
实体来获取AccountID
下的数据(公司名称,地址,雇主识别码)。
RecordRef recordRef = new RecordRef();
recordRef.externalId = "TSTDRV1531161";
recordRef.type = RecordType.account;
recordRef.typeSpecified = true;
ReadResponse response = _service.get(recordRef);
不会返回任何结果。我怎样才能得到这些信息?
答案 0 :(得分:0)
试试这个
var sub = new SubsidiarySearchBasic();
var res = netSuiteService.search(sub);
if (res.status.isSuccess)
{
if (res.totalPages == res.pageIndex)
{
var result = res.recordList.ToList().Any() ? res.recordList.ToList().Cast<Subsidiary>().ToList() : null;
}
else
{
var resultados = res.recordList.ToList().Cast<Subsidiary>().ToList();
for (var i = 2; i <= res.totalPages; i++)
{
var resPages = netSuiteService.searchMoreWithId(res.searchId, i);
if (resPages.status.isSuccess)
resultados.AddRange(res.recordList.ToList().Cast<Subsidiary>().ToList());
}
}
}
else
throw new Exception(string.Join(",", res.status.statusDetail.ToList()));