I’ve got a customization I’ve been tasked with. When I develop a new “blank” form, I want to be able to access data from other parts of the system and store them into “normal” DataViews. I can go in and create the FKV based on the data from my created DataView from within the customization.
The issue I’m having is, when I load up the form I get the following error:
The FKV does not show up in the designer, and I cannot remove it without going into the XML properties.
If I go in and reproduce the line that is causing the error after my custom DataView gets defined in the InitializeCustomCode() method, then everything works fine, even though I still get the error message the first time it tries to call the CallAddForeignKeyView method.
Is there a way that anybody knows that I can do a foreign key view on a blank UD form without tying it to the UD table?
I doubt this will accomplish what you need. A FKV is tied to a current DataView. If you don’t already have a DataView that will be your parent, then this is not the correct solution. I would offer a BAQView instead.
Ah. Then you will need to try to create the DataView before any other code runs. Not sure it’s possible, but are you creating the DataView at the very beginning of the InitializeCode?
You can do this @Doug.C you just have to attach the FKV yourself (manually after your view is created)
This can be done just add it via the wizard, -> Save, go to View all Code and find the 1 or 2 lines that Epicor Adds for it something like this
Those were the lines I was putting after my DV creation that allowed me to see it in the list. I had tried this, but there was another line after it relating to an EpiDataView which I didn’t look at closely enough. Defining that and adding this call worked.