【问题标题】:Acumatica SOAP Contract API-BusinessAccountPaymentInstructionDetail for Vendor AddAcumatica SOAP Contract API-BusinessAccountPaymentInstructionDetail for Vendor Add
【发布时间】:2020-10-06 15:10:39
【问题描述】:

我有一个用于将供应商上传到 Acumatica 的 C# 应用程序。作为其中的一部分,我希望能够将 EFT 付款信息加载到付款设置页面上的付款说明中。看起来我应该在 API 中使用 BusinessAccountPaymentInstructionDetail,并且我尝试了各种方法但不能想办法。有没有人这样做并愿意分享代码示例?

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

这是我在创建后更新供应商的代码部分。它适用于 Checks,添加 Fedwire 是我遇到问题的地方。

//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

谢谢,

吉姆

【问题讨论】:

标签: api soap acumatica vendor contract


【解决方案1】:

您使用错误的方式来识别线条

new BusinessAccountPaymentInstructionDetail
        {
            PaymentInstructionsID = new StringValue { Value = <line ID which is visible on Payment Method> },
            Value = new StringValue { Value = <your value> }
        }

也应该处理单个请求

【讨论】:

  • 谢谢你,我昨天真的想通了!!我也刚回来更新这篇文章。
【解决方案2】:
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 },
 },
};

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-11-18
    • 1970-01-01
    • 2018-03-03
    • 1970-01-01
    • 2021-06-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多