This document describes the PX1083 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1083 | Changes cannot be saved to the database from data view delegates. | Error | Unavailable |
Changes cannot be saved to the database from data view delegates. Data view delegates are designed to prepare a data set to be displayed in the UI or used in the code.
To prevent the error from occurring, you should remove from the data view delegate the code that saves changes to the database and rework the related business logic.
public class ShipmentProcess : PXGraph<ShipmentProcess>
{
[PXFilterable]
public PXFilteredProcessingJoin<SOShipment, ShipFilter,
LeftJoin<Customer,
On<SOShipment.customerID, Equal<Customer.bAccountID>>>,
Where<CustomerExtension.sCust, Equal<True>,
And<CustomerExtension.sReq, Equal<True>>>>
ShipmentList;
protected virtual IEnumerable shipmentList()
{
var sel = new PXSelectJoin<SOShipment,
InnerJoin<BAccount,
On<SOShipment.customerID,
Equal<BAccount.bAccountID>>>>(this);
this.Actions.PressSave();//The PX1083 error is displayed for this line.
return sel.Select();
}
}