BPM using "Erp.Contracts.Proc."

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.

Captura
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

1 Like

I haven’t worked with the Bank stuff. However, I would first ensure the Erp.Contracts.BO.BankFundTran assembly is added to your list of references. That’s typically the cause of “The type or namespace name does not exist” error.

Click the Usings & References… button at the bottom-right and add the Erp.Contracts.BO.BankFundTran assembly.

Hello, thanks for replying.
I have already added that assembly and theres no change.

These are BankFund’s Files on my server folder:
Captura

I have both BankFundTran, and BankFundPost, the diference between them is the prefix : BO/PROC

When i use in the code BankFundTran , theres no problem , but i need to use the BankFundPost so i can force the sysagent to do the posting task.

What BO/method do you customize with BPM? And what version of ERP.

1 Like

Hey Sergey, im the Max Co-worker,

He is using The PostProcessing of CashGroup.PrePostGroup


and we are using the ERP 10.2.200.27:

Code: (note i modify it to see exactly like our code)

Usings:
Max4
References:
Max5

1 Like

It’s easy :slight_smile: You reference incorrect assembly. You have to use Erp.Contracts.Proc.BankFundPost instead of Erp.Contracts.BO.BankFundTran. Current one defines BankFundTranSvcContract, not BankFundPostSvcContract.

1 Like

When we searched for Erp.Contracts.Proc nothing appeared, but we let it load for >30s and then they appeared.
Silly issue, thanks for the help!

ERP contains a huge number of libraries. Since BPM needs to show only server-side assembly it has to scan related catalogs on the server and send the result back to the client. Originally we did it in one batch, but the first call looked as the system hang. Further calls use client-side cache which lives until epicor.exe restarted. To improve the user experience we switched to page-based load. It allows (at least) to get some of the results pretty fast.

1 Like