Skip to main content
Solved

How to Debug a builtin function. i want to debug the delete action of soinvoice screen.


Greeting all, 
before upgrading to 23r2 there was no problems with 22r1

but after upgrading i am facing an error in invoices screen
There is an error that’s pops up whenever i want to delete any invoice.
says “This record is referenced by at least one 'dbo.SOInvoice' record. The operation cannot be completed.”

 


i unpublished all the customizations and then it worked well,
so i tried and commented The customizations of soinvoice_extension and its dac extensions only but the error still the same.

so i may have to debug the delete action to see why it gives error and how to solve it.

So how to debug the builtin delete action?

Best answer by mohammadessam53

ok for those who will come through google in future.

i indeed found graph extension of both arinvoiceEntry and soInvoiceEntry,
when i commented both of them the error is gone and it could be deleted normally,

then i traced the code bit by bit till i found which part was the cause of the error and it somehow ended up being some views

precisely those.

        public PXSelect<ARRegister, Where<ARRegister.refNbr, Equal<Required<ARRegister.refNbr>>, And<ARRegister.docType, Equal<Required<ARRegister.docType>>>>> document;
        public PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>, And<SOOrder.orderType, Equal<Required<SOOrder.orderType>>>>> order;

i removed document view because it wasn’t used
and replace order view with 
PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>, And<SOOrder.orderType, Equal<Required<SOOrder.orderType>>>>>.Select(Base,orderNbr, orderType);
in the event handlers

and it worked.

View original
Did this topic help you find an answer to your question?

4 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @mohammadessam53,

For instructions on how debug source code refer, https://help.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=40fcc931-64ac-4016-9d05-7426a22712da

 

As the issue happens only with the customization, do you have any dll that has a graph extension to the screen? If so, you might have to consider debugging the graph extension as well. Good Luck,


I tried to comment the graph extension of soinvoice but it didn’t work.
is there any graph or dac that may cause this error

and for the debugging 
i cannot find the delete method to debug, how could i find it?. 
all i find is an action that is inherited through the graph parent with no method body .
is there a method like Persist but for deleting? and how to find and debug it


  • Author
  • Freshman II
  • 3 replies
  • Answer
  • January 17, 2024

ok for those who will come through google in future.

i indeed found graph extension of both arinvoiceEntry and soInvoiceEntry,
when i commented both of them the error is gone and it could be deleted normally,

then i traced the code bit by bit till i found which part was the cause of the error and it somehow ended up being some views

precisely those.

        public PXSelect<ARRegister, Where<ARRegister.refNbr, Equal<Required<ARRegister.refNbr>>, And<ARRegister.docType, Equal<Required<ARRegister.docType>>>>> document;
        public PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>, And<SOOrder.orderType, Equal<Required<SOOrder.orderType>>>>> order;

i removed document view because it wasn’t used
and replace order view with 
PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>, And<SOOrder.orderType, Equal<Required<SOOrder.orderType>>>>>.Select(Base,orderNbr, orderType);
in the event handlers

and it worked.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2754 replies
  • January 17, 2024

Thank you for sharing your solution with the community @mohammadessam53!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings