Solved

Getting Invalid Object Name when trying to press removeFromHold in Generic Graph Extension


Userlevel 7
Badge +8

I am trying to press RemoveFromHold button on APInvoiceEntry from a Generic Graph Extension but I’m receiving the below error. Can someone help please? The error is “System.Data.SqlClient.SqlException: 'Invalid object name 'PXMappedCacheExtension'.'” For the sake of claification, when I press this button from inside the APInvoiceEntry Extension it works. But since this is repeating for 7 screens, I’m converting some of the logics of these extensions to GGE to prevent from repeating.

 

 

icon

Best answer by aaghaei 28 October 2022, 02:13

View original

4 replies

Userlevel 5
Badge +1

The error seems to indicate a bad table name. Do you have an unbound DAC, if it is not properly annotated that might cause this.

Userlevel 7
Badge +8

@Shawn Burt it is not the case. What causes the problem is GGE mapping and I’m unsure how I can fix it. If I copy the code into an extension to APInvoiceEntry, It works flawless.

Userlevel 7
Badge

Hi @aaghaei - were you ever able to find a solution to your issue? Thank you!

Userlevel 7
Badge +8

Hi ​​​@Chris Hackett I couldn’t make Acumatica’s GGE method work so Instead, I used c# built-in “dynamic” declaration of objects I am going to perform actions on them and it works. It basically follows the same logic but doesn’t rely on Acumatica’s function library. ie 

public static IEnumerable UnholdProcessor(PXAdapter Adapter, PXGraph Graph, dynamic Document, dynamic DocumentExt)
{
dynamic Base = Graph;
// Do stuff
Base.Actions[RemoveFromHold].Press();
// Do stuff
Base.Document.Update(Document);
Base.Save.Press();

return Adapter.Get();
}

then I call this method in any graph extension “RemoveFromHold” action that I want.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved