如何在不提供其内部ID值的情况下更新NetSuite套件对话中的字段 [英] How to Update a Field in NetSuite suite talk without its internal id giving its internal id value

查看:111
本文介绍了如何在不提供其内部ID值的情况下更新NetSuite套件对话中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Suite Talk API创造机会.在更新实体字段值时,它返回错误,因为它需要该字段的内部ID值,但无法解决内部ID.

I have tried to create a opportunity with suite talk API. while updating the entity field value it returns error because it needs internal id value of the field but it is not feasible to address the internal id.

   ReflectionExtensions.SetPropertyValue(NS_OPPURTUNITY, map.Dst_Fld_Name, new RecordRef()
                                                {
                                                    internalId = "2551",
                                                    type = RecordType.customer,
                                                    typeSpecified = true
                                                });

我想摆脱该静态ID来引用实体.

i want to get rid of that static id to reference the entity.

推荐答案

据我所知,您需要内部ID才能通过Web服务引用任何对象.但是,您可以通过先搜索要参考的项目来找到内部ID.

As far as I know, you need the internal ID to reference any object through web services. You can however find the internal ID by first searching for the item you need to reference.

您可以使用CustomerSearch查找客户的内部ID:

You can use a CustomerSearch to find the internal ID of your customer:

CustomerSearch custSearch = new CustomerSearch();
SearchStringField name = new SearchStringField();
name.SearchValue = "firstName";
name.operatorSpecified = true;
name.@operator = SearchStringFieldOperator.@is;

CustomerSearchBasic custBasic = new CustomerSearchBasic();
custBasic.firstName= customerEntityID;

custSearch.basic = custBasic;

// Search for the customer entity
SearchResult res = _service.search(custSearch);

//Get the internal ID of the customer
string internalID = ((Customer) (res.recordList[0])).internalId;

您还可以使用名字"之外的其他字段来搜索客户.在此处检查CustomerSearchBasic对象上还有哪些其他字段: CustomerSearchBasic

You can search for the customer using other fields besides 'firstName' as well. Check which other fields are available on the CustomerSearchBasic object here: CustomerSearchBasic

这篇关于如何在不提供其内部ID值的情况下更新NetSuite套件对话中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆