Correction Field on Table 122 = True

When I create a new Puchase Credit Memo, based on a Puch Invoice Header Document Nº, I would Like to Update the Correction Field (98) = TRUE on Table 122 - Puch Invoice Header, on Post Credit Memo.

Where can I Do That. In What Objet and in Wich Moment?

I tried with Code Coverage but no good results. I Think should be on CU 90 - Purch.-Post. But I am Not sure And I don’t now were:(

Thansk

Are you saying that when the PO CM has the “Applies-To Doc. No” filled you want the change “Correction” to true?

Why not add Correction := true; onvalidate of the “applies-to doc. no” then?

Hy

Your idear will be ok if I inser manualy “Applies-To Doc. No” in Purch Credir Memo Header. But in this case, I create my Credit Memo automaticaly with Functions/ Copy Document.

So

Applies-to Doc. No. - OnValidate()
PurcInvHeader.Correction := TRUE;

Will not be run. Am I correct?

Thanks

There one way to find out…try it.

also, How about on release of the document. It can check for a value in the applies to doc no and if it’s not blank you have it change correction to true.

if “Apples-to doc no.” <>’’ then Correction := true;

there’s a bunch of way to handle this…it shouldn;t be too complicated.