Solved

Error: Inserting 'Customer Call' record raised at least one error. Please review the errors.

  • 27 July 2023
  • 4 replies
  • 90 views

I’m creating a new form and it requires selecting a business account. so I have written the Code as follows in the DAC,

 #region BAccountID
        [PXDBInt()]
        [PXDefault()]
        [PXUIField(DisplayName = "Business Account")]
        [PXSelector(typeof(Search<BAccount.bAccountID>),
            typeof(BAccount.acctCD),
            typeof(BAccount.acctName)
        )]

    public virtual int? BAccountID { get; set; }
    public abstract class bAccountID : PX.Data.BQL.BqlInt.Field<bAccountID> { }
    #endregion

when I’m entering the new record, it raised an error as follows,

 “Error: Inserting  'Customer Call' record raised at least one error. Please review the errors.” 

 

But when I’m selecting another business account in the same form, I can save the data successfully. However, I can't save the data with the business account I initially chose and it raised an error like “Error: Updating  'Customer Call' record raised at least one error. Please review the errors.”

how can I resolve this error? Does anyone have an idea?

Thank you!

icon

Best answer by jinin 27 July 2023, 19:46

View original

4 replies

Userlevel 7
Badge +11

Hi @saumyasewwandi60 

Can you try the Selector like below,


        [PXSelector(typeof(Search<BAccount.bAccountID,Where<BAccount.type, Equal<BAccountType.customerType>>>)
            ,SubstituteKey = typeof(BAccount.acctCD),
            DescriptionField = typeof(BAccount.acctName), Filterable = true,
            DirtyRead = true
        )]
 

And also cross-check whether the 5441 customer record is already available in the system.

Yes.  it's working. Thank you jinin 

Userlevel 7
Badge +11

Great!  Thank you.

Hi,

I have changed the selector as follows,

  #region BAccountID
        [PXDBInt()]
        [PXDefault()]
        [PXUIField(DisplayName = "Business Account")]
         [PXSelector(typeof(Search<BAccount.bAccountID, Where<BAccount.type, Equal<BAccountType.customerType>>>),
        SubstituteKey = typeof(BAccount.acctCD),
        DescriptionField = typeof(BAccount.acctName),
        Filterable = true,
        DirtyRead = true
         )]
        

        public virtual int? BAccountID { get; set; }
        public abstract class bAccountID : PX.Data.BQL.BqlInt.Field<bAccountID> { }

    #endregion

Now the data is saved successfully, but when I select the entered record from a generic inquiry and update the contact field, it shows a warning message in the business account field.

 how to avoid this warning?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved