Hi all,
I have gone through the Acumatica training material a few times on this but cannot find the issue.Â
I have created a new screen with the corresponding DACs’ as per the T210 and T220 training material. I have setup the entire DAC with a master-detail relationship setup but get the following error when trying to create a new item.
Error: Inserting  'LTFGItems' record raised at least one error. Please review the errors. Error: 'Batch Nbr' cannot be empty.
This is what the screen looks like:
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/919baba3-0a57-4e29-90db-2a37c83fc1e4.png)
The DACs’ are setup with the LTFGHeader (Parent) and LTFGItems (Child) - I have just added the fields in question for the sake of saving space:
 LTFGHeader
#region BatchNbr
     PXDBString(15, IsUnicode = true, IsKey = true, InputMask = "")]
     =PXUIField(DisplayName = "Batch Number",ÂRequired = true,Â
Visibility = PXUIVisibility.SelectorVisible)]
    tPXDefault]
     >AutoNumber(typeof(INSetupExt.usrFinGoodsBatchNbr), typeof(LTFGHeader.batchDate))]
     tPXSelector(typeof(Search<LTFGHeader.batchNbr>))]
     public virtual string BatchNbr { get; set; }
     public abstract class batchNbr : PX.Data.BQL.BqlString.Field<batchNbr> { }
     #endregion LTFGItem
     #region BatchNbr
    Â     PXUIField(DisplayName = "Batch Nbr")]
     ePXDBDefault(typeof(LTFGHeader.batchNbr))]
     FPXParent(typeof(SelectFrom<LTFGHeader>.    Where<LTFGHeader.batchNbr.IsEqual<LTFGItems.batchNbr.FromCurrent>>))]
     public virtual string BatchNbr { get; set; }
     public abstract class batchNbr : PX.Data.BQL.BqlString.Field<batchNbr> { }
     #endregion
Â
When I do not enter a Item and just save the header, it works perfectly and a new number is generated.Â
Â
Any help, advice or comments will be greatly appreciated.Â
Thanks
Â