Can't find an EFx library when it's "promoted"

I suppose I’m doing something wrong, a given.

But I’m getting the error below (can’t find a library) when the library is in the Promoted state. I can demote the library and it works just fine.

Reckon it has anything to do with adding the function to the code while it was in a demoted state?

Thanks,

Joe

Server Side Exception

BPM runtime caught an unexpected exception of 'InvalidOperationException' type.
See more info in the Inner Exception section of Exception Details.

Exception caught in: Epicor.ServiceModel

Error Detail 
============
Correlation ID:  f8858ef1-8014-49fe-91d5-ec932a89b455
Description:  BPM runtime caught an unexpected exception of 'InvalidOperationException' type.
See more info in the Inner Exception section of Exception Details.
Program:  Epicor.Functions.Runtime.dll
Method:  GetFunctionInfo
Line Number:  21
Column Number:  17
Original Exception Type:  InvalidOperationException
Server Trace Stack:     at Epicor.Functions.Runtime.EfxRuntimeExtensions.GetFunctionInfo(IFunctionsCatalog functionsCatalog, FunctionRefId refId, String forCompany) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Functions.Runtime\EfxRuntimeExtensions.cs:line 21
   at Epicor.Customization.Bpm.CustomizationBase2`2.FindFunction(FunctionRefId& refId) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\CustomizationBase2.Plugins.cs:line 81
   at Epicor.Customization.Bpm.CustomizationBase2`2.Epicor.Functions.IFunctionHost.GetFunctionAdapter(FunctionRefId& function) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\CustomizationBase2.Efx.cs:line 43
   at EFx.TEGLeverage.Implementation.TEGAPIKeyLibraryProxy.GetAPIKey(String inApplicationCode)
   at EFx.TEGLeverage.Implementation.POSTPOJSONImpl.A001_InvokeEpicorFunctionAction2()
   at EFx.TEGLeverage.Implementation.POSTPOJSONImpl.RunStep(Int32 workflowStep)
   at Epicor.Functions.FunctionBase`3.Run() in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Functions.Core\FunctionBase.cs:line 99
   at Epicor.Functions.FunctionBase`3.Run(TInput input) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Functions.Core\FunctionBase.cs:line 82
   at EFx.TEGLeverage.Implementation.POSTPOJSONImpl.AdapterRun(ITuple input)
   at Epicor.Functions.FunctionBase`3.Epicor.Functions.IFunctionAdapter.Run(ITuple input) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Functions.Core\FunctionBase.Adapter.cs:line 11
   at Epicor.Customization.Bpm.CustomizationBase2`2.InvokeFunction(String libraryId, String functionId, ITuple input) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\CustomizationBase2.Plugins.cs:line 66
   at Epicor.Customization.Bpm.DirectiveBase`2.InvokeFunction(String libraryId, String functionId, ITuple input) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\DirectiveBase.Generic.Plugins.cs:line 351
   at Epicor.Customization.Bpm.BO.UpdatePostProcessingDirective_LeveragePOPost_D3F948AFECC443928EB41AFC74B96465.A002_InvokeEpicorFunctionAction2()
   at Epicor.Customization.Bpm.BO.UpdatePostProcessingDirective_LeveragePOPost_D3F948AFECC443928EB41AFC74B96465.ExecuteCore(Int32 step)
   at Epicor.Customization.Bpm.DirectiveBase`2.Execute() in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 337
   at Epicor.Customization.Bpm.DirectiveBase`2.Execute(TParam parameters) in C:\_releases\ICE\ICE4.3.100.0\Source\Server\Customization\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 191



Client Stack Trace 
==================
   at Epicor.ServiceModel.Channels.ImplBase.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
   at Epicor.ServiceModel.Channels.ImplBase.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
   at Epicor.ServiceModel.Channels.ImplBase.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
   at Erp.Proxy.BO.POImpl.Update(PODataSet ds)
   at Erp.Adapters.POAdapter.OnUpdate()
   at Ice.Lib.Framework.EpiBaseAdapter.Update()
   at Erp.UI.App.POEntry.Transaction.Update()

Inner Exception 
===============
Can't find library: 'TEGAPIKey'

Does the TEGAPIKey Library have access to the companies? Access Scope?

Seems odd that it would work in the demoted state.

Weird, I’d export it and reimport it with the force option.

Doh. Company wasn’t set. Grr.

Thanks, folks.

3 Likes

Wait, so it ignores security when it’s not promoted?

Seems that way.

1 Like

Yep… see @Banderson’s idea Make function permissions work the same when demoted or promoted

2 Likes

I already voted for it lol.

Oh No Oops GIF by Paramount+

3 Likes