Solved

Error Auto number property field

  • 16 September 2023
  • 4 replies
  • 46 views

Userlevel 3
Badge
Error: An error occurred during processing of the field RefNbr: Error: 'RefNbr' cannot be found in the system.
 Stack Trace:
PX.Data.PXSetPropertyException: Error: '[RefNbr]' cannot be found in the system. at PX.Data.PXSelectorAttribute.throwNoItem(String[] restricted, Boolean external, Object value) at PX.Data.PXSelectorAttribute.Verify(PXCache sender, PXFieldVerifyingEventArgs e, Object& item) at PX.Data.PXSelectorAttribute.FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e) at PX.Data.PXCache.OnFieldVerifying(String name, Object row, Object& newValue, Boolean externalCall) at PX.Data.PXCache`1.FillWithValues(TNode item, TNode copy, IDictionary values, PXCacheOperation operation, Boolean externalCall) at PX.Data.PXCache`1.FillWithValues(TNode item, TNode copy, IDictionary values, PXCacheOperation operation, Boolean externalCall) at PX.Data.PXCache`1.Update(IDictionary keys, IDictionary values) at PX.Data.PXGraph.ExecuteUpdate(String viewName, IDictionary keys, IDictionary values, Object[] parameters)
icon

Best answer by Naveen Boga 18 September 2023, 14:18

View original

4 replies

Userlevel 7
Badge +5

We’ll need more information like the DAC that’s involved.

Userlevel 3
Badge

data access

    [PXDBString(15, InputMask = ">CCCCCCCCCCCCCCC", IsKey = true, IsUnicode = true)]
    [PXDefault]
    [PXUIField(DisplayName = "RefNbr")]
    [PXSelector(typeof (BOQInspHeader.refNbr), DescriptionField = typeof (BOQInspHeader.descr))]
    [AutoNumber(typeof(GLSetupExt.usrInspectorRefNbr), typeof(BOQInspHeader.enterDate))]
        public virtual string RefNbr
    {
      get => this._RefNbr;
      set => this._RefNbr = value;
    }

 

and in graph

 

public PXSetup<GLSetup> setup;

 public InspectorEntry()
 {
   this.action.AddMenuAction((PXAction) this.releaseWIP);
   GLSetup current = setup.Current;
 }

 

When startup It should display NEW in scree but it show blank

 

Userlevel 7
Badge +17

@kevinheng21  Can you please try like below and check?

 

   [PXDBString(15, InputMask = ">CCCCCCCCCCCCCCC", IsKey = true, IsUnicode = true)]
    [PXDefault]
    [PXUIField(DisplayName = "RefNbr")]
    [PXSelector(typeof (BOQInspHeader.refNbr), DescriptionField = typeof (BOQInspHeader.descr))]
    [AutoNumber(typeof(Search<GLSetupExt.usrInspectorRefNbr>), typeof(BOQInspHeader.enterDate))]
        public virtual string RefNbr
    {
      get => this._RefNbr;
      set => this._RefNbr = value;
    }

 

Userlevel 7
Badge +5

In addition to what Naveen has offered, I’d also consider the following changes to the DAC declaration:

[PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]

and

[PXSelector(typeof(SearchFor<BOQInspHeader.refNbr>), DescriptionField = typeof (BOQInspHeader.descr))]

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