0
votes

In a custom Acumatica PXGraph class, I have code that tries to insert into a view:

var maintGraph = (EEdiDocTradedMaint)graph;
ediDocTraded = maintGraph.EdiDocTraded.Insert(ediDocTraded);

The view is defined as:

public PXSelect<EEdiDocTraded> EdiDocTraded;

The data being inserted is a custom DAC class instantiated and property values set. The Insert above throws an error that "The required configuration data is not entered on the Customer Management Preferences form". There is a custom numbering sequence for these rows, but it is defined as it should be.

What am I missing to get the Insert to succeed?

1

1 Answers

1
votes

EEdiDocTradedMaint graph or another graph dependency declares a setup DataView:

PXSetup<SetupDAC> setup;

Setup DataView are special because they expect the database to contain 1 setup record already. If the database doesn't contain it, some validations are triggered.

It will look into the PXPrimaryGraph attribute of the setup DAC to see which graph should be used for saving that setup record:

[PXPrimaryGraph(typeof(SetupDACMaint))]
public class SetupDAC : IBqlTable
{
    […]
}

In the customization (following standards) there should be a Setup screen using that setup graph (ex: SetupDACMaint). The user has to open that screen, fill in the values and save in order to enter the setup record into the database. Once that is done the missing setup data error will disappear. When properly setup there should be a link on the error page that redirects to the setup page.