Hello guys , i need some help posting a bank fund transaction record.
I´ve been able to create the records but not posting them on a BPM.
On my BPM im trying to use this code but it throws “Type/Namespace not found”, but using other types of svcContract’s like : “BankFundTranSvcContract” i get no errors.
Erp.Contracts.BankFundPostSvcContract comes from the lib: Erp.Proxy.Proc.BankFundPostImpl
I managed to post them with some c# code, but i need to run this inside epicor , in a bpm.
This is the code i use on C#
using (BankFundTranImpl baImpl = WCFServiceSupport.CreateImpl<BankFundTranImpl>(session, ImplBase<BankFundTranSvcContract>.UriPath))
{
BankFundTranDataSet bds = baImpl.CreateBankTran();
bds.Tables[0].Rows[0]["ExchangeRate"] = 1;
bds.Tables[0].Rows[0]["CurrencyCode"] = "PESO";
baImpl.ChangeFromAmt(9, bds, true);
baImpl.ChangeFromBank("DEBIT", bds, true);
baImpl.ChangeTargetBank("0551", bds, false);
baImpl.ChangeTranDate(DateTime.Today, bds, true);
baImpl.ValidateBeforeTransfer(bds);
TranNum= baImpl.CreateBankTranRecords(bds);
using (BankFundPostImpl xx = WCFServiceSupport.CreateImpl<BankFundPostImpl>(session, ImplBase<BankFundPostSvcContract>.UriPath))
{
BankFundPostDataSet ds = xx.GetNewParameters();
ds.Tables[0].Rows[0]["TranNum"] = TranNum;
ds.Tables[0].Rows[0]["RowMod"] = "A";
ds.Tables[0].Rows[0]["SysRowID"] = "00000000-0000-0000-0000-000000000000";
ds.Tables[0].Rows[0]["SourceBank"] = bds.Tables[0].Rows[0]["BankAcctID"];
ds.Tables[0].Rows[0]["TargetBank"] = bds.Tables[0].Rows[0]["ToBankAcctID"];
ds.Tables[0].Rows[0]["TranDate"] = bds.Tables[0].Rows[0]["TranDate"];
xx.SubmitToAgent(ds, "SystemTaskAgent", 0, 0, "Erp.UIProc.BankFundPost");
}
Has anybody worked with this or have a solution in mind?
Thanks