首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Acumatica SOAP合同API-BusinessAccountPaymentInstructionDetail for Vendor Add

Acumatica SOAP合同API-BusinessAccountPaymentInstructionDetail for Vendor Add
EN

Stack Overflow用户
提问于 2020-06-17 05:52:58
回答 2查看 217关注 0票数 0

我有一个用于将供应商上传到Acumatica的C#应用程序。作为这项工作的一部分,我希望能够加载电子转账付款信息到付款设置页面上的付款指令.It看起来我应该使用BusinessAccountPaymentInstructionDetail在API中,我已经尝试了各种方法,但无法弄清楚。有没有人这样做并愿意分享代码的样本?

我能够很好地创建供应商,然后返回并更新从供应商类填充的字段。付款方法和付款说明是在Acumatica中设置的,我正在尝试在创建时更新每个供应商的值。

这是我在创建后更新供应商的代码部分。它可以很好地用于检查,添加Fedwire是我遇到问题的地方。

代码语言:javascript
复制
//Create a Vendor record with the specified values
Vendor newVendor = (Vendor)client.Put(VendorToBeCreated);
Debug.WriteLine("*********** Vendor was created.");

//Update values on added vendor that defaulted from Vendor Class
//Cash Account
//Payment Method
//Payment Instructions for FEDWIRE
if (PaymentMethod == "CHECK")
{                                    
newVendor.PaymentMethod.Value = PaymentMethod;
Debug.WriteLine("***********Cash Account and Payment Method Added*********");
}
else
{
if (PaymentMethod == "FEDWIRE")
{
Debug.WriteLine("***********FEDWIRE*********");                                        

//This is where I am having issues trying to figure out what to pass in

newVendor.PaymentInstructions = new BusinessAccountPaymentInstructionDetail[]
{
new BusinessAccountPaymentInstructionDetail()
{
PaymentMethod = new StringValue { Value = PaymentMethod},
Description =  new StringValue { Value = "Bank Name:"},
Value =  new StringValue { Value = "123456"},
},
new BusinessAccountPaymentInstructionDetail()
{
PaymentMethod = new StringValue { Value = PaymentMethod },
Description =  new StringValue { Value = "Bank Routing Number (ABA):" },
Value =  new StringValue { Value = "267077627" },
},                                     
new BusinessAccountPaymentInstructionDetail()
{
PaymentMethod = new StringValue { Value = PaymentMethod },
Description =  new StringValue { Value = "Beneficiary Account No:" },
Value =  new StringValue { Value = "987654321" },
},
new BusinessAccountPaymentInstructionDetail()
{
PaymentMethod = new StringValue { Value = PaymentMethod},
Description =  new StringValue { Value = "Beneficiary Name:" },
Value =  new StringValue { Value = "Jim" },
},
};
}
}
newVendor.CashAccount.Value = CashAccount;
client.Put(newVendor);
}
//End add Vendor

谢谢,

吉姆

EN

回答 2

Stack Overflow用户

发布于 2020-06-19 00:16:56

您使用了错误的方式来识别这些行

代码语言:javascript
复制
new BusinessAccountPaymentInstructionDetail
        {
            PaymentInstructionsID = new StringValue { Value = <line ID which is visible on Payment Method> },
            Value = new StringValue { Value = <your value> }
        }

也应该只处理一个请求

票数 0
EN

Stack Overflow用户

发布于 2020-06-20 00:27:40

代码语言:javascript
复制
newVendor.PaymentInstructions = new BusinessAccountPaymentInstructionDetail[]
{
//Beneficiary Account No
new BusinessAccountPaymentInstructionDetail()
{                                               
 PaymentInstructionsID =new StringValue { Value = "1" },                                                  
 Value =  new StringValue { Value = eftankacct },
},
//Beneficiary Name
new BusinessAccountPaymentInstructionDetail()
{
PaymentInstructionsID =new StringValue { Value = "2" },                                                     
Value =  new StringValue { Value = beneficiaryname },
},
//Bank Routing Number (ABA)
 new BusinessAccountPaymentInstructionDetail()
{
PaymentInstructionsID =new StringValue { Value = "3" },                                                  
Value =  new StringValue { Value = eftransitroutingno },
},
//Bank Name
new BusinessAccountPaymentInstructionDetail()
{
 PaymentInstructionsID =new StringValue { Value = "4" },                                               
 Value =  new StringValue { Value = bankname },
 },
};
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62418163

复制
相关文章

相似问题

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