title: Is there anyway to implement a custom BQL type?
body: <p>I am looking to incorporate the &quot;<a href="https://github.com/andrewlock/StronglyTypedId" rel="nofollow noreferrer">StronglyTypedId</a>&quot; nuget package into my Acumatica Extension Library project for my DAC Ids, but I am running into problems with the PXCache being unable to cast between the database type and the DAC property type.</p>
  <p>I originally tried using the [PXDBInt] attribute on the DAC field, and declared implicit operators for casting to and from int for the strongly typed ID struct, but this did not work, and threw an invalid cast exception (cant remember the exact exception name).</p>
  <p>The next step I thought to try, but was put off due to lack of documentation for how to go about it, was to create a custom PXDBField attribute, eg [StronglyTypedIdDBInt], and examine and try to replicate the code for PXDBInt that is visible in source. This looked to involve more inner workings of the framework than I'm comfortable with, like also having to implement a PXFieldState class.</p>
  <p>At this point I'm not sure how I would go about this. The field really is just an int field behind the scenes, so how can I trick the framework to seeing it that way? Is there anyway to specify some sort of BQL converter to use? Is there documentation I can read on how to make a custom BQL type and/or a custom PXDBFieldAttribute?</p>
  <p>I've had a blast developing with the Acumatica framework, but when it comes to some of the cool nitty gritty stuff in the framework, I have a hard time finding comprehensive resources. I am a big fan of Yuriy's blog, and his answers on this site, as well as a few other Acumatica Developer dedicated blogs, but I still havent quite found what Im looking for.</p>