Skip to main content
Solved

Trying to make Expense Claim date and description to match what is on the first Expense Receipt

  • September 25, 2024
  • 2 replies
  • 43 views

Hello,

I have been trying to create a customization that sets the Expense Claim’s date and description to match the Expense Receipt’s date and description when I click CLAIM (instead of the defaults of today’s date and Submitted Receipts).

This is what I have so far, but it is throwing up an error : error CS0115: 'ExpenseClaimEntry_Extension.Persist()': no suitable method found to override

 

Thank you for any help!

Best answer by Zoltan Febert

Hi @jrbunnMECO,

PXGraphExtension is not inherited from ExpenseClaimEntry, so you are not able to override it’s Persist method.

You get that compiler error because PXGraphExtension doesn’t have a Persist method.

Try to override it in this way:

[PXOverride]
public virtual void Persist(Action baseMethod)
{
    // your code
    baseMethod.Invoke();
}

Please review Acumatica Customization Guide - T300 course - Customizing Business Logic section for more details.

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

2 replies

Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+3
  • Jr Varsity I
  • 175 replies
  • Answer
  • October 3, 2024

Hi @jrbunnMECO,

PXGraphExtension is not inherited from ExpenseClaimEntry, so you are not able to override it’s Persist method.

You get that compiler error because PXGraphExtension doesn’t have a Persist method.

Try to override it in this way:

[PXOverride]
public virtual void Persist(Action baseMethod)
{
    // your code
    baseMethod.Invoke();
}

Please review Acumatica Customization Guide - T300 course - Customizing Business Logic section for more details.


hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • October 4, 2024

Hello @jrbunnMECO ,

The CLAIM action will propagate receipt date and description to the line details of the Expense Claim.

It will be like repetitive data if you override the Date and Description on the summary section with the receipt’s date and description values.

 

If you still want to customize then I would try overriding the EPExpenseClaim_RowPersisting event and check if there is a single row available in the Details grid to overwrite the date and description values. There could be other better solutions but this is what got now top off my head.

 

Hope this helps!


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