Skip to main content
Answer

Object reference not set to an instance of an object

  • June 22, 2023
  • 4 replies
  • 392 views

Michael Ndungi
Varsity I
Forum|alt.badge.img

I added a new field of type PXNoteAttribute to the DAC to enable file attachment.
i.e 

 #region NoteID
public abstract class noteID : PX.Data.IBqlField { }
protected Guid? _NoteID;
[PXNote()]
public virtual Guid? NoteID { get; set; }
#endregion

On testing I got the following error
 

what could be the issue?
 

Kindly assist.
Thank you all.

Best answer by Naveen Boga

Hi @development93  I just tried this and I can able to upload the files for the Bidding GRID.

 

Here are the steps.

  1. Extend the RQBiddingVendor and add the NoteID field 

 

  1. Extend the RQBiddingVendor  DAC and add the NoteID field.
  public class RQBiddingVendorExt : PXCacheExtension<RQBiddingVendor>
{
#region Noteid
[PXNote()]
public virtual Guid? NoteID { get; set; }
public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
#endregion
}

 

  1. And add the FileIndicator = true for the Bidding GRID
  1. After performing the above steps, NOTES field will be enabled and able to upload the files.

 

 

4 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • June 22, 2023

..


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

Hi @development93  I just tried this and I can able to upload the files for the Bidding GRID.

 

Here are the steps.

  1. Extend the RQBiddingVendor and add the NoteID field 

 

  1. Extend the RQBiddingVendor  DAC and add the NoteID field.
  public class RQBiddingVendorExt : PXCacheExtension<RQBiddingVendor>
{
#region Noteid
[PXNote()]
public virtual Guid? NoteID { get; set; }
public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
#endregion
}

 

  1. And add the FileIndicator = true for the Bidding GRID
  1. After performing the above steps, NOTES field will be enabled and able to upload the files.

 

 


Michael Ndungi
Varsity I
Forum|alt.badge.img

Thanks @Naveen Boga 
works perfectly.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • June 22, 2023

@development93  Awesome !! Thanks for sharing the udpate!