Netsuite Web Services .net SDK。如何检索自定义字段的值/

时间:2018-04-25 15:59:12

标签: .net vb.net netsuite suitetalk

我正在尝试从Netsuite中的自定义记录中检索一些数据。我已经设置了一个已保存的搜索,我将从搜索结果行中获取结果以获取字段值,这对于默认字段是可以的,但我无法弄清楚如何获取自定义字段的值。我有一个名为" custrecord_example"的选择自定义字段。我可以从脚本ID获取,但我需要检索值。我在其他帖子上看到你可以使用GetSearchValue方法,但我不会在SearchColumnSelectCustomField对象上得到它。

Dim searchRes As SearchResult = ns_Service.search(
                New CustomRecordSearchAdvanced With {.savedSearchId = "590"})

            For pageCount As Integer = 1 To searchRes.totalPages

                For Each sRow As Object In searchRes.searchRowList
                    Dim id As Long = sRow.basic.id(0).searchValue


                    For Each custField As SearchColumnCustomField In sRow.basic.customFieldList

                        If custField.scriptId = "custrecord_example" Then

                            Dim custSelectField As SearchColumnSelectCustomField = DirectCast(custField, SearchColumnSelectCustomField)

                            'Do something here to get the Value from custSelectField

                        End If
                    Next


                Next

                searchRes = ns_Service.searchMore(pageCount + 1)

            Next

0 个答案:

没有答案