我有一个用于将供应商上传到Acumatica的C#应用程序。作为这项工作的一部分,我希望能够加载电子转账付款信息到付款设置页面上的付款指令.It看起来我应该使用BusinessAccountPaymentInstructionDetail在API中,我已经尝试了各种方法,但无法弄清楚。有没有人这样做并愿意分享代码的样本?
我能够很好地创建供应商,然后返回并更新从供应商类填充的字段。付款方法和付款说明是在Acumatica中设置的,我正在尝试在创建时更新每个供应商的值。
这是我在创建后更新供应商的代码部分。它可以很好地用于检查,添加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谢谢,
吉姆
发布于 2020-06-19 00:16:56
您使用了错误的方式来识别这些行
new BusinessAccountPaymentInstructionDetail
{
PaymentInstructionsID = new StringValue { Value = <line ID which is visible on Payment Method> },
Value = new StringValue { Value = <your value> }
}也应该只处理一个请求
发布于 2020-06-20 00:27:40
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 },
},
};https://stackoverflow.com/questions/62418163
复制相似问题