Skip to main content
Answer

Error Auto number property field

  • September 16, 2023
  • 4 replies
  • 74 views

Forum|alt.badge.img
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)

Best answer by Naveen Boga

@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;
    }

 

4 replies

Forum|alt.badge.img+7
  • Captain II
  • September 16, 2023

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


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • September 18, 2023

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

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • September 18, 2023

@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;
    }

 


Forum|alt.badge.img+7
  • Captain II
  • September 18, 2023

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))]