首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >添加Acumatica客户联系人

添加Acumatica客户联系人
EN

Stack Overflow用户
提问于 2015-06-16 09:02:54
回答 1查看 309关注 0票数 0

我在使用web服务添加客户联系人时遇到了问题,在集成的第一个实例中,我的应用程序成功地添加了使用web服务的联系人。但是,当我在同一个客户中重新集成相同的联系人时,它会复制以前集成的联系人,而不是仅仅更新它们。我尝试向ContactID字段添加值,但是它给了我从string到int转换失败的错误。

代码语言:javascript
复制
AR303000Content custSchema = context.AR303000GetSchema();
                        var commands = new Acumatica_LSOne_Integration.ARMODULE.Command[]
                        {
                            new Acumatica_LSOne_Integration.ARMODULE.Value 
                            {
                                Value = RecID.Replace("-"," ").Trim(), 
                                LinkedCommand = custSchema.CustomerSummary.CustomerID 
                            },

                            custSchema.Actions.NewContact
                        };
                        context.AR303000Submit(commands);

                        CR302000Content contSchema = context.CR302000GetSchema();
                        commands = new Acumatica_LSOne_Integration.ARMODULE.Command[]
                        {                                
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("CONTACTNAME")).Trim(), LinkedCommand = contSchema.DetailsSummary.LastName}, 
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("STREET")).Trim(), LinkedCommand = contSchema.DetailsAddress.AddressLine1},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("ADDRESS")).Trim(), LinkedCommand = contSchema.DetailsAddress.AddressLine2},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("CITY")).Trim(), LinkedCommand = contSchema.DetailsAddress.City},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("COUNTRY")).Trim(), LinkedCommand = contSchema.DetailsAddress.Country},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("ZIPCODE")).Trim(), LinkedCommand = contSchema.DetailsAddress.PostalCode},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("EMAIL")).Trim(), LinkedCommand = contSchema.DetailsContact.Email},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("PHONE")).Trim(), LinkedCommand = contSchema.DetailsContact.Phone1},
                            new Acumatica_LSOne_Integration.ARMODULE.Value {Value = reader1.GetString(reader1.GetOrdinal("CELLULARPHONE")).Trim(), LinkedCommand = contSchema.DetailsContact.Phone2},
                            contSchema.Actions.Save,
                        };
                        context.CR302000Submit(commands);
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-17 07:12:24

希望您正在使用屏幕ID的AR303000和CR302000,

  • 在客户模式中添加操作命令"Add“并提交
  • 您可以使用屏幕CR302000和设置ContactID并首先提交,以便将所有信息(如果存在)加载到架构中。
  • 稍后,您将添加用于更新所需值的命令,并使用保存命令提交。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30863120

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档