BPM runtime caught an unexpected exception of 'MissingMethodException' type

Hi guys, good day everyone.

I need your help because I don’t know what the problem is with my BPM. I created 3 UD columns on InvcHead table TokenAnticipo_c (string), FechaCambioTokenAnticipo_c (DateTime) y TokenEnviadoMail_C (boolean), then I make 3 bpm for 3 cases, the first one is when is created a Deposit Billing in AR Invoice, this set a new GUID into the field TokenAnticipo_c, the second is when the field TokenEnviadoMail_c change from false to true, generate a new GUID.

Well, the reality is when I make my test, the first BPM works successfully, and the second test shows the value of the field TokenEnviadoMail_c, but when I try to post the invoice, the second BPM throws an exception.

Error: Ice.Common.EpicorServerException: BPM runtime caught an unexpected exception of 'MissingMethodException' type.
See more info in the Inner Exception section of Exception Details. ---> System.MissingMethodException: Method not found: 'Boolean Erp.Tables.InvcHead.get_TokenEnviadoMail_c()'.
   at Epicor.Customization.Bpm.DB.InTranDirective_BOX_BPM_DD_InvcHead_ReenviarMail_F0D6B39F7A2B40A3B09CC1151E2E2F24.C001_FieldCondition(Object currentRow)
   at Epicor.Customization.Bpm.DB.InTranDirective_BOX_BPM_DD_InvcHead_ReenviarMail_F0D6B39F7A2B40A3B09CC1151E2E2F24.ExecuteCore()
   at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE4.1.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 146
   --- End of inner exception stack trace ---
   at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE4.1.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 162
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at Epicor.Customization.Bpm.CustomizationBase2`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE4.1.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 87
   at Epicor.Customization.Bpm.InTranTriggerBase2`3.Write(LinqRow newRecord, LinqRow oldRecord) in C:\_Releases\ICE\ICE4.1.100.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\InTranTriggerBase2.cs:line 109
   at Ice.Triggers.TriggerQueue.ExecuteBpmWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRec) in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 344
   at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 173
   at Ice.Triggers.TriggerQueue.<>c__DisplayClass9_0.<RunWriteTrigger>b__1() in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 147
   at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
   at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 82
   at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in C:\_Releases\ICE\ICE4.1.100.32\Source\Server\Framework\Epicor.System\Data\IceDataContext.cs:line 561
   at Erp.Internal.Lib.ValidatingTransactionScope..ctor(ErpContext context, TimeSpan TransactionTimeSpan, Boolean UndoOnError, Boolean AutoCompleteRoot) in C:\_releases\ERP\ERP11.1.100.32\Source\Server\Internal\Lib\Shared\ValidatingTransactionScope\ValidatingTransactionScope.cs:line 57
   at Erp.Internal.PE.PEABT.AbtCreateABT(String cACTName, String cCompany, String cGroupID, String cDocUID, Nullable`1 dActiveDate, Int32& iRevisionUID) in C:\_releases\ERP\ERP11.1.100.0\Source\Server\Internal\PE\PEABT\PEABT.cs:line 1116
   at Erp.Internal.PE.AR_InvoicePre_Post.Post() in C:\_releases\ERP\ERP11.1.100.32\Source\Server\Internal\PE\AR_Invoice\AR_InvoicePre_Post.cs:line 1016

This error only occurs in the Pilot environment, but when I try to do it in the Test environment works successfully.

Are you sure the UD Column Definitions for the InvcHead table are in the Pilot database?

Yes, I create the solution for the fields in Pilot and installed it in the Test environment to try to find the error

Did you remember to regen the database afterwards? Installing the solution won’t do that.

Of course, in both environments I did that right after creating the columns, even that was discarded because they are also working on other things so they needed to regenerate again, as well as recycle the pool

Well something didn’t stick.

System.MissingMethodException: Method not found: ‘Boolean Erp.Tables.InvcHead.get_TokenEnviadoMail_c()’.

The directive cannot find that field. Check your definition, and regen again.

1 Like

Regen, restart app server and then try to recreate in BPM the item that fails - for some reason it thinks the field is not UD

This is one of the tests I’ve done, where the returned value is that of the field, although I don’t know why it prints it twice

It is the result of this BPM

I have found, apparently it is an error in the application server, this is due to the fact that the application server and the agent server are separated, for which the bpm dlls (I think it was something like that) were not copied correctly to the server of agents, for which reason, the copying and regeneration was done manually.

With that the problem was solved.

Yes, our team just have the same experience. Our Application Server separated become two machine, Interactive App Server and Report App Server. This problem caused by the BPMs not synced between two of those App Server. Then do this step will solved the problem:

  1. Regenerate Data Model ini DB Server
  2. Restart App Pool for Interactive App Server
  3. Restart App Pool for Report App Server

If the problem still exist, then:

  1. Disable and Save the related BPM (can be seen in error detail)
  2. Enable and Save the related BPM .

In our case, problem solved after disable and enable the BPM.