0
votes

We have created a new Custom Screen via a Customization project to display a header/detail list of custom data. Via the UI the screen is working and we are able to add/edit/delete header and detail records.

We are attempting to create a Web Service Endpoint link to this screen to allow access to the data via Web Services. When we attempt to call the Put on the entity we are getting back a Value must not be Null error message. We have supplied all the fields that are available with values and trace isn't showing what could be causing the error.

Is there anything we need to add to the DAC for Web Services?

Below are screenshots of the Custom Screen and the WSE Setup OzPallets Custom Screen OzPallets WSE Header

1
Can you add the Structure of the entity you are using for your Put call and also tell us if any fields are mandatory on this custom screen? - samol518
var palletNo = String.Format("PN{0}{1}{2}-{3}{4}{5}-{6}", DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond); - Chris Marshall
c.Put(new OzPallets { PalletNo = new StringValue { Value = palletNo }, Warehouse = new StringValue { Value = "RETAIL" }, Location = new StringValue { Value = "R10RACK1" }, Status = new StringValue { Value = "New" }, Details = new[] { new OzPalletDetail { PalletNo = new StringValue { Value = palletNo }, InventoryID = new StringValue { Value = "AALEGO500" }, ItemQty = new DecimalValue { Value = 10 }, LineNbr = new IntValue { Value = 1 } } } }); - Chris Marshall
Above is the put call, the PalletNo is the only field that is required - Chris Marshall
There might be an issue on the API side, but the chances are quite high there might be one in the custom page. Is it possible to get a simplified version of your custom page (Aspx + BLC + primary DAC) to verify where exactly the issue is? - RuslanDev

1 Answers

0
votes

Chris, could you please comment on your choice of the PXFilter type to declare all data views in the OzPalletData BLC?

public class OzPalletData : PXGraph<OzPalletData>
{
    public PXSave<OzPalletHeader> Save;
    public PXCancel<OzPalletHeader> Cancel;

    public PXFilter<OzPalletHeader> MasterView;
    public PXFilter<OzPalletDetail> DetailsView;
}

I believe an issue should get resolved by data view declared as follows:

public class OzPalletData : PXGraph<OzPalletData>
{
    public PXSave<OzPalletHeader> Save;
    public PXCancel<OzPalletHeader> Cancel;

    public PXSelect<OzPalletHeader> MasterView;
    public PXSelect<OzPalletDetail, 
        Where<OzPalletDetail.palletNo, Equal<Current<OzPalletHeader.palletNo>>>> DetailsView;
}