Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.44 KB

PX1083.md

File metadata and controls

39 lines (31 loc) · 1.44 KB

PX1083

This document describes the PX1083 diagnostic.

Summary

Code Short Description Type Code Fix
PX1083 Changes cannot be saved to the database from data view delegates. Error Unavailable

Diagnostic Description

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.

Example of Incorrect Code

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();
    }
}