Add info to AP Invoice line ud table

Hello Guys,

i´m in the need to add some information to existing already posted invoices. i know posted invoices are not available for edition, but the info I´m trying to add/modify belongs to the APInvDtl_UD table… I know for sure those tables are editable since i´ve created the custom for the APInvMsc_UD table…

the issue is that i haven´t been able to point to the current APInvDtl dataview row… and it always seems to take row 0 as default… do you know what do i need to do to get current row in this line?:


Code seems correct, EpiDataView.row should point to the current row.

Have you tried Posted Invoice Update? Exposing the fields there for update or maybe they already are.

Hi Jonathan,

no, i have not, actually I´m creating the custom over the APInvoiceTracker.
I know the EpiDataView.Row should do the “trick” since as i have already build a custom for the same purpose but using the APInvMsc_ud fields… right there it is working properly… i don´t know why it is not while using the APinvDtl table…

You could also try an updatable dashboard.

Hi Jason,

i´ve tried building an updateable dashboard but unfortunately i can´t even create the updateable BAQ, i keep receiving the message that posted invoices can´t be updated, no matter if I’m trying only to modify APInvDtl_UD fields… should you have any suggestion on what methods should in the updateable BAQ?

Since they are UD fields, you may be able to write some BPM code to update the values from the BAQ.

thank you Jason,

let me see if I can find something here in the group, related to BPMs, since I have zero experience writing them. Should you have any tip or guide would be awesome.

Best regards.

It will be something like this (Disclaimer: I did not test anything, just typed it into notepad):

foreach (var tt in ttResults.Where(tt => tt.Updated()))
  var apInvMsc = Db.ApInvMsc.Where(A => 
			A.Company == calContextBPMData.CurrentCompany && 
			A.VendorNum == tt.APInvMsc_VendorNum && 
			A.InvoiceNum == tt.APInvMsc_InvoiceNum && 
			A.InvoiceLine == tt.APInvMsc_InvoiceLine && 
			A.MscNum == tt.APInvMsc_MscNum).FirstOrDefault();
  if (apInvMsc != null)
	apInvMsc.MyUDField_c = tt.APInvMsc_MyUDField_c;