0
votes

I have a graph called InvoiceEntry (AP301000). This graph contains a DAC called APInvoice/APRegister.

When I save the APInvoice record, the OrigDocAmt field clears whatever value was in there, and sets it to null in the DB. I have no idea why....

1

1 Answers

0
votes

Use menu item CUSTOMIZATION->Inspect Element then click on one of the form header fields to lookup the exact DAC and Graph names which are APInvoice and APInvoiceEntry:

enter image description here

Open Source Code page (SM204570) and search for the class APInvoiceEntry. Once you have located the file, expand the regions and search for assignation to the target field APInvoice.OrigDocAmt:

enter image description here

There are multiple reasons why this field value will be set to 0 by this page, some pasted below. Introducing different behaviors for it could lead to unexpected issues because it is heavily managed by the system already.

sender.RaiseExceptionHandling<APInvoice.curyOrigDocAmt>(doc, null, null);
sender.SetValueExt<APInvoice.curyOrigDocAmt>(doc, 0m);
Document.Cache.RaiseFieldUpdated<APInvoice.curyOrigDocAmt>(doc, 0m);