Solved

A valid ExpirationYear is required error in Updatable

  • 11 February 2022
  • 4 replies
  • 165 views

  • Anonymous
  • 0 replies

I’m working on a updatable dashboard and I’m getting an error that says “A valid ExpirationYear is required” when I try to edit a row which has a ExpirationYear before 2022. Oddly enough I can edit rows with a  ExpirationYr of 0 or a blank ExpressionYr. Has anyone encountered this issue before?

(If it helps, the query on the dashboard has expiration yr fields in OrderHed, CashHead, and InvcHead)

 

icon

Best answer by jtrent 15 February 2022, 00:12

View original

4 replies

Userlevel 2

I would check first for a BPM on the business object your updatable dashboard is using to see if that’s where the check is coming in. If so, you’d want only to verify the year on an added record or when that field has actually changed.

Joe

How would I go about verifying  the year on an added record or when the field has actually changes? I found ExpirationYear as part of the update bpm for invoice head for the object to query mapping

and vice versa.

If I remove the two lines, I still get the error.

Userlevel 2

I’m just guessing that someone put a BPM on a method somewhere to check the year and throw an exception when the invoice info is entered. I don’t know what method your updatable BAQ is using. Here’s what I would first check. If the method is ARInvoice: your BAQ update would look something like this:

 So then I would look for a directive on ARInvoice.Update or ARInvoice.UpdateExt.

I don’t know how this directive might be written, but here’s how I would go about it in the method directive, not in the directive on your query. This example assumes it’s on ARInvoice.Update.

 

 

Of course, if your query is adding an invoice header record and copying an existing invoice header with an invalid year, you would still get the error and would have to figure out what to do in that case.

It could well be my assumptions are wrong, but this is where I would start digging.

Good luck!

Joe

Just as an update, I used your conditions and set the expiration year to the current year plus two to get rid of the error. Thanks

Reply