Alfredo Ibarra
Alfredo Ibarra

Reputation: 73

Acumatica Update does not work for Custom field

I am facing two issues.

  1. I have created the following field in SOLine SOLineExt

but when I try to reference this extension from SOOrderEntry.cs it does not recognize it.

Am I missing something?

To make it work, I copied this class to the SOOrderEntry.cs and commented out in the original class.

  1. The other issue that I am facing is in regard the update for this new field. it is updating in the cache and showing in the grid but does not update in the SOLIne DAC. Eventually I'll delete this field from the grid. I am showing it just to see if it was updating.

I am doing basically the same as the "T300_AcumaticaCustomizationPlatform_2017R2" instructed on Page 47 - 65.

a) Created an Action button

b) Defined an action delegated method

c) Added FieldUpdated Enevent Handler

Here are the copy of my codes:

createCustomerFixedPrice

SOLine_UsrFixedPrice_FieldUpdated

Sales Order Grid with UsrFixedPriced field Updated

SOLine with UsrFixedPriced field NOT Updated

Any help will be gratefully appreciated, especially in the second issue.

Upvotes: 0

Views: 1050

Answers (1)

Hugues Beauséjour
Hugues Beauséjour

Reputation: 8278

Did you create your new field using Acumatica Project Editor?

Like this: enter image description here

When you create a database bound field (type PXDBType instead of PXType) using the project editor it automatically adds the matching DB script to create the database column: enter image description here

From your question it's not clear if you created the DAC directly in a source code file or using Acumatica Project Editor. So I would recommend you check if the database script was created and if not create it manually. Then Save the customization project, re-publish it and if possible check with a database utility if the field actually exists in database.

Also you used default namespace and extension name for your extension DAC:

PX.Objects.SO.SOLineExt

Since that is the default it could clash with other customizations that also use the same defaults. To reduce chance of a conflict you could change the default namespace to your own:

MyNamespace.SOLineExt

Upvotes: 0

Related Questions